autoload/lsp/lsp.vim | 2 +- autoload/lsp/options.vim | 2 ++ doc/lsp.txt | 3 +++ diff --git a/autoload/lsp/lsp.vim b/autoload/lsp/lsp.vim index 1cfb4697631fc532bbe7bf1e5f7506ad59ea6ae7..79892e58500e81d480c46308ba24de8dcbe18d03 100644 --- a/autoload/lsp/lsp.vim +++ b/autoload/lsp/lsp.vim @@ -48,7 +48,7 @@ prop_type_add('LspWriteRef', {highlight: 'DiffDelete', override: true}) 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 33cbffa32c0437711831039739847b6627a278c3..1b20a997d7fc7908d8bfd254390f73a6480190ed 100644 --- a/autoload/lsp/options.vim +++ b/autoload/lsp/options.vim @@ -38,6 +38,8 @@ # Default diagnostic highlight on lines 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 39fb8c3304d8d58155d6e61ab0e0b4a5378a0a27..da139ce504b298af0cf3da827fc1f621bbce5f81 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -337,6 +337,9 @@ version 9.0.0178 or later. 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.