From: Oleksiy Hryshchenko Date: Mon, 27 Mar 2023 16:00:30 +0000 (+0300) Subject: add diagVirtualTextHL highlight option X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=71cbcfc0723f392b02e952de7df85cd5675cdced;p=vim-lsp.git add diagVirtualTextHL highlight option --- diff --git a/autoload/lsp/lsp.vim b/autoload/lsp/lsp.vim index 1cfb469..79892e5 100644 --- a/autoload/lsp/lsp.vim +++ b/autoload/lsp/lsp.vim @@ -48,7 +48,7 @@ def LspInitOnce() if has('patch-9.0.1157') && opt.lspOptions.showDiagWithVirtualText if !hlexists('LspDiagVirtualText') - hlset([{name: 'LspDiagVirtualText', linksto: 'LineNr'}]) + hlset([{name: 'LspDiagVirtualText', linksto: opt.lspOptions.diagVirtualTextHL}]) endif prop_type_add('LspDiagVirtualText', {highlight: 'LspDiagVirtualText', override: true}) endif diff --git a/autoload/lsp/options.vim b/autoload/lsp/options.vim index 33cbffa..1b20a99 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -38,6 +38,8 @@ export var lspOptions: dict = { diagLineHL: 'DiffAdd', # Show a diagnostic messages with virtual text showDiagWithVirtualText: false, + # The highlight group used for a diagnostics virtual text + diagVirtualTextHL: 'LineNr', # Don't print message when a configured language server is missing. ignoreMissingServer: false, # Use a floating menu to show the code action menu instead of asking for input diff --git a/doc/lsp.txt b/doc/lsp.txt index 39fb8c3..da139ce 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -337,6 +337,9 @@ showInlayHints |Boolean| option. Show inlay hints from the language showDiagWithVirtualText |Boolean| option. Show diagnostic messages text from the language server with virtual text. By default this is set to false. Needs Vim version 9.0.1157 or later. +diagVirtualTextHL |String| option. + The highlight group used for a diagnostics virtual text. + By default uses "LineNr". showSignature |Boolean| option. In insert mode, automatically show the current symbol signature in a popup. By default this is set to true.