commit 330444994616e48e5e4d15bbf72d7c5346943565
parent 7a6e27958a80b3aebb1335b78aa81c26c79b7f37
Author: Jorge Mederos <46798594+jmederosalvarado@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:47:14 +0200
fix(lsp): log unknown diagnostic tags instead of showing a warning (#25705)
To be more in line with the specification:
> To support the evolution of enumerations the using side of an enumeration shouldn’t fail on an enumeration value it doesn’t know. It should simply ignore it as a value it can use and try to do its best to preserve the value on round trips
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
@@ -2,6 +2,7 @@
local util = require('vim.lsp.util')
local protocol = require('vim.lsp.protocol')
+local log = require('vim.lsp.log')
local ms = protocol.Methods
local api = vim.api
@@ -88,10 +89,7 @@ local function tags_lsp_to_vim(diagnostic, client_id)
tags = tags or {}
tags.deprecated = true
else
- vim.notify_once(
- string.format('Unknown DiagnosticTag %d from LSP client %d', tag, client_id),
- vim.log.levels.WARN
- )
+ log.info(string.format('Unknown DiagnosticTag %d from LSP client %d', tag, client_id))
end
end
return tags