aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Mederos <46798594+jmederosalvarado@users.noreply.github.com>2023-10-21 08:47:14 +0200
committerGitHub <noreply@github.com>2023-10-21 08:47:14 +0200
commit330444994616e48e5e4d15bbf72d7c5346943565 (patch)
treebaac3922c5a58d2ac2da15d91868b8f150088257
parent7a6e27958a80b3aebb1335b78aa81c26c79b7f37 (diff)
downloadrneovim-330444994616e48e5e4d15bbf72d7c5346943565.tar.gz
rneovim-330444994616e48e5e4d15bbf72d7c5346943565.tar.bz2
rneovim-330444994616e48e5e4d15bbf72d7c5346943565.zip
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
-rw-r--r--runtime/lua/vim/lsp/diagnostic.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
index 73444d8c6a..b6f0cfa0b3 100644
--- 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