From: Oleksiy Hryshchenko Date: Wed, 29 Mar 2023 18:39:17 +0000 (+0300) Subject: up X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2fc030bd3960b2feabb5d7e83a72269411ca5b6c;p=vim-lsp.git up --- diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index 18c247b..5b20f4f 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -13,26 +13,26 @@ export def InitOnce() sign_define([ { name: 'LspDiagError', - text: opt.lspOptions.diagSignOpts.error.text, - texthl: opt.lspOptions.diagSignOpts.error.texthl, + text: opt.lspOptions.diagSignErrorText, + texthl: opt.lspOptions.diagSignErrorTexthl, linehl: lineHL }, { name: 'LspDiagWarning', - text: opt.lspOptions.diagSignOpts.warning.text, - texthl: opt.lspOptions.diagSignOpts.warning.texthl, + text: opt.lspOptions.diagSignWarningText, + texthl: opt.lspOptions.diagSignWarningTexthl, linehl: lineHL }, { name: 'LspDiagInfo', - text: opt.lspOptions.diagSignOpts.info.text, - texthl: opt.lspOptions.diagSignOpts.info.texthl, + text: opt.lspOptions.diagSignInfoText, + texthl: opt.lspOptions.diagSignInfoTexthl, linehl: lineHL }, { name: 'LspDiagHint', - text: opt.lspOptions.diagSignOpts.hint.text, - texthl: opt.lspOptions.diagSignOpts.hint.texthl, + text: opt.lspOptions.diagSignHintText, + texthl: opt.lspOptions.diagSignHintTexthl, linehl: lineHL } ]) diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index f8e648e..d99f759 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -54,24 +54,14 @@ export var lspOptions: dict = { # list of completion items completionMatcher: 'case', # diagnostics signs options - diagSignOpts: { - error: { - text: 'E>', - texthl: 'ErrorMsg', - }, - warning: { - text: 'W>', - texthl: 'Search', - }, - info: { - text: 'I>', - texthl: 'Pmenu', - }, - hint: { - text: 'H>', - texthl: 'Question', - }, - }, + diagSignErrorText: 'E>', + diagSignErrorTexthl: 'ErrorMsg', + diagSignWarningText: 'W>', + diagSignWarningTexthl: 'Search', + diagSignInfoText: 'I>', + diagSignInfoTexthl: 'Pmenu', + diagSignHintText: 'H>', + diagSignHintTexthl: 'Question', } # set the LSP plugin options from the user provided option values diff --git a/doc/lsp.txt b/doc/lsp.txt index 10e353d..92ebf3e 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -351,27 +351,22 @@ usePopupInCodeAction |Boolean| option. When using the |:LspCodeAction| command to display the code action for the current line, use a popup menu instead of echoing. By default this is set to false. -diagSignOpts |dict| option. Options that allow you to change diagnostic - sings text and highlight - default settings - diagSignOpts: { - error: { - text: 'E>', - texthl: 'ErrorMsg', - }, - warning: { - text: 'W>', - texthl: 'Search', - }, - info: { - text: 'I>', - texthl: 'Pmenu', - }, - hint: { - text: 'H>', - texthl: 'Question', - }, - }, +diagSignErrorText |String| option. Change diag sign text for errors + By default 'E>' +diagSignErrorTexthl |String| option. Change diag sign highlight for errors + By default 'ErrorMsg', +diagSignWarningText |String| option. Change diag sign text for warnings + By default 'W>', +diagSignWarningTexthl |String| option. Change diag sign highlight for warnings + By default 'Search', +diagSignInfoText |String| option. Change diag sign text for info + By default 'I>', +diagSignInfoTexthl |String| option. Change diag sign text highlight info + By default 'Pmenu', +diagSignHintText |String| option. Change diag sign text for hints + By default 'H>', +diagSignHintTexthl |String| option. Change diag sign highlight for hints + By default 'Question', For example, to disable the automatic placement of signs for the LSP