export def InitOnce()
var lineHL: string = opt.lspOptions.diagLineHL
# Signs used for LSP diagnostics
- sign_define([{name: 'LspDiagError', text: 'E>', texthl: 'ErrorMsg',
- linehl: lineHL},
- {name: 'LspDiagWarning', text: 'W>', texthl: 'Search',
- linehl: lineHL},
- {name: 'LspDiagInfo', text: 'I>', texthl: 'Pmenu',
- linehl: lineHL},
- {name: 'LspDiagHint', text: 'H>', texthl: 'Question',
- linehl: lineHL}])
+ sign_define([
+ {
+ name: 'LspDiagError',
+ text: opt.lspOptions.diagSignOpts.error.text,
+ texthl: opt.lspOptions.diagSignOpts.error.texthl,
+ linehl: lineHL
+ },
+ {
+ name: 'LspDiagWarning',
+ text: opt.lspOptions.diagSignOpts.warning.text,
+ texthl: opt.lspOptions.diagSignOpts.warning.texthl,
+ linehl: lineHL
+ },
+ {
+ name: 'LspDiagInfo',
+ text: opt.lspOptions.diagSignOpts.info.text,
+ texthl: opt.lspOptions.diagSignOpts.info.texthl,
+ linehl: lineHL
+ },
+ {
+ name: 'LspDiagHint',
+ text: opt.lspOptions.diagSignOpts.hint.text,
+ texthl: opt.lspOptions.diagSignOpts.hint.texthl,
+ linehl: lineHL
+ }
+ ])
if opt.lspOptions.showDiagWithVirtualText
if !hlexists('LspDiagVirtualText')
# icase | fuzzy | case match for language servers that replies with a full
# 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',
+ },
+ },
}
# set the LSP plugin options from the user provided option values
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<any>| 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',
+ },
+ },
+
For example, to disable the automatic placement of signs for the LSP
diagnostic messages, you can add the following line to your .vimrc file: >