aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorGhjuvan Lacambre <code@lacamb.re>2020-04-29 16:53:13 +0200
committerGitHub <noreply@github.com>2020-04-29 16:53:13 +0200
commitf9055c585f597fe4ea8ecb990927a2826234393c (patch)
tree12842c0e5f796ef886641f47352abc827b7e3dad /runtime/lua/vim/lsp/util.lua
parente9cc383614d449b7269632c991525db77c387154 (diff)
downloadrneovim-f9055c585f597fe4ea8ecb990927a2826234393c.tar.gz
rneovim-f9055c585f597fe4ea8ecb990927a2826234393c.tar.bz2
rneovim-f9055c585f597fe4ea8ecb990927a2826234393c.zip
LSP: enable using different highlighting rules for LSP signs (#12176)
This commit creates 4 new highlight groups: - LspDiagnosticsErrorSign - LspDiagnosticsWarningSign - LspDiagnosticsInformationSign - LspDiagnosticsHintSign These highlight groups are linked to their corresponding LspDiagnostics highlight groups by default. This lets users choose a different color for their sign columns and virtualtext diagnostics.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 9ca18cb2b1..7d4dc072e5 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -672,6 +672,7 @@ do
table.insert(cmd_parts, k.."="..v)
end
api.nvim_command(table.concat(cmd_parts, ' '))
+ api.nvim_command('highlight link ' .. highlight_name .. 'Sign ' .. highlight_name)
severity_highlights[severity] = highlight_name
end