commit bac133e4b6eaabf28b758d10f0107b25ade9d4b7
parent fb7a234f01b64724cbe94cf748ee177861a6a1ca
Author: Riley Bruins <ribru17@hotmail.com>
Date: Tue, 10 Jun 2025 21:26:06 -0700
fix(lsp): announce diagnostic tag support (#34436)
This commit also adds a type annotation to the returned client
capabilities table, because without it lua_ls does not provide
autocompletion for the fields within the table.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
@@ -329,6 +329,7 @@ end
--- capabilities.
--- @return lsp.ClientCapabilities
function protocol.make_client_capabilities()
+ ---@type lsp.ClientCapabilities
return {
general = {
positionEncodings = {
@@ -340,6 +341,9 @@ function protocol.make_client_capabilities()
textDocument = {
diagnostic = {
dynamicRegistration = false,
+ tagSupport = {
+ valueSet = get_value_set(constants.DiagnosticTag),
+ },
},
inlayHint = {
dynamicRegistration = true,