Skip to content

Commit bac133e

Browse files
authored
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.
1 parent fb7a234 commit bac133e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runtime/lua/vim/lsp/protocol.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ end
329329
--- capabilities.
330330
--- @return lsp.ClientCapabilities
331331
function protocol.make_client_capabilities()
332+
---@type lsp.ClientCapabilities
332333
return {
333334
general = {
334335
positionEncodings = {
@@ -340,6 +341,9 @@ function protocol.make_client_capabilities()
340341
textDocument = {
341342
diagnostic = {
342343
dynamicRegistration = false,
344+
tagSupport = {
345+
valueSet = get_value_set(constants.DiagnosticTag),
346+
},
343347
},
344348
inlayHint = {
345349
dynamicRegistration = true,

0 commit comments

Comments
 (0)