From: Andreas Louv Date: Wed, 29 Mar 2023 18:38:26 +0000 (+0200) Subject: Clear inline diagnostic highlight with ":LspDiagHighlightDisable" X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a555da8d2fa6688fb6dc1bfd7d3a5f8ef1fcc36e;p=vim-lsp.git Clear inline diagnostic highlight with ":LspDiagHighlightDisable" --- diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index 7a56c5f..4661ca7 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -489,9 +489,18 @@ export def DiagsHighlightDisable() # Remove the diganostics virtual text in all the buffers. if opt.lspOptions.showDiagWithVirtualText + || opt.lspOptions.highlightDiagInline for binfo in getbufinfo({bufloaded: true}) # Remove all virtual text - prop_remove({type: 'LspDiagVirtualText', bufnr: binfo.bufnr, all: true}) + if opt.lspOptions.showDiagWithVirtualText + prop_remove({type: 'LspDiagVirtualText', bufnr: binfo.bufnr, all: true}) + endif + if opt.lspOptions.highlightDiagInline + prop_remove({type: 'LspDiagInlineError', bufnr: binfo.bufnr, all: true}) + prop_remove({type: 'LspDiagInlineWarning', bufnr: binfo.bufnr, all: true}) + prop_remove({type: 'LspDiagInlineInfo', bufnr: binfo.bufnr, all: true}) + prop_remove({type: 'LspDiagInlineHint', bufnr: binfo.bufnr, all: true}) + endif endfor endif