mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
feat(lsp): lsp.completion support set deprecated (#29882)
Problem: CompletionItem in lsp spec mentioned the deprecated attribute Solution: when item has deprecated attribute set hl_group to DiagnosticDeprecated in complete function
This commit is contained in:
@@ -99,6 +99,13 @@ local constants = {
|
||||
TriggerForIncompleteCompletions = 3,
|
||||
},
|
||||
|
||||
-- Completion item tags are extra annotations that tweak the rendering of a
|
||||
-- completion item
|
||||
CompletionTag = {
|
||||
-- Render a completion as obsolete, usually using a strike-out.
|
||||
Deprecated = 1,
|
||||
},
|
||||
|
||||
-- A document highlight kind.
|
||||
DocumentHighlightKind = {
|
||||
-- A textual occurrence.
|
||||
@@ -433,13 +440,16 @@ function protocol.make_client_capabilities()
|
||||
snippetSupport = true,
|
||||
commitCharactersSupport = false,
|
||||
preselectSupport = false,
|
||||
deprecatedSupport = false,
|
||||
deprecatedSupport = true,
|
||||
documentationFormat = { constants.MarkupKind.Markdown, constants.MarkupKind.PlainText },
|
||||
resolveSupport = {
|
||||
properties = {
|
||||
'additionalTextEdits',
|
||||
},
|
||||
},
|
||||
tagSupport = {
|
||||
valueSet = get_value_set(constants.CompletionTag),
|
||||
},
|
||||
},
|
||||
completionItemKind = {
|
||||
valueSet = get_value_set(constants.CompletionItemKind),
|
||||
|
Reference in New Issue
Block a user