diff options
author | jakbyte <jakbyte@gmail.com> | 2020-04-26 18:36:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-26 15:36:40 -0700 |
commit | 5f41717838f4cd9d1087e452640ba554500279ab (patch) | |
tree | 63f72984ed6d134fcf9f4a42e4579bdee19248aa /runtime/lua/vim/lsp.lua | |
parent | 50ff37308abde6c33c2800529cd58f1d7413d7b3 (diff) | |
download | rneovim-5f41717838f4cd9d1087e452640ba554500279ab.tar.gz rneovim-5f41717838f4cd9d1087e452640ba554500279ab.tar.bz2 rneovim-5f41717838f4cd9d1087e452640ba554500279ab.zip |
LSP: don't redefine LspDiagnostics signs #12164
fix #12162
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 17135e078c..c7de2df25f 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1017,5 +1017,21 @@ function lsp.get_log_path() return log.get_filename() end +local function define_default_sign(name, properties) + if not vim.fn.sign_getdefined(name) then + vim.fn.sign_define(name, properties) + end +end + +-- Define the LspDiagnostics signs if they're not defined already. +local function define_default_lsp_diagnostics_signs() + define_default_sign('LspDiagnosticsErrorSign', {text='E', texthl='LspDiagnosticsError', linehl='', numhl=''}) + define_default_sign('LspDiagnosticsWarningSign', {text='W', texthl='LspDiagnosticsWarning', linehl='', numhl=''}) + define_default_sign('LspDiagnosticsInformationSign', {text='I', texthl='LspDiagnosticsInformation', linehl='', numhl=''}) + define_default_sign('LspDiagnosticsHintSign', {text='H', texthl='LspDiagnosticsHint', linehl='', numhl=''}) +end + +define_default_lsp_diagnostics_signs() + return lsp -- vim:sw=2 ts=2 et |