From 330444994616e48e5e4d15bbf72d7c5346943565 Mon Sep 17 00:00:00 2001 From: Jorge Mederos <46798594+jmederosalvarado@users.noreply.github.com> Date: Sat, 21 Oct 2023 08:47:14 +0200 Subject: fix(lsp): log unknown diagnostic tags instead of showing a warning (#25705) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- runtime/lua/vim/lsp/diagnostic.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime/lua/vim') 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 -- cgit