mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
feat(lsp): initial support for dynamic capabilities (#23681)
- `client.dynamic_capabilities` is an object that tracks client register/unregister - `client.supports_method` will additionally check if a dynamic capability supports the method, taking document filters into account. But only if the client enabled `dynamicRegistration` for the capability - updated the default client capabilities to include dynamicRegistration for: - formatting - rangeFormatting - hover - codeAction - hover - rename
This commit is contained in:
@@ -697,7 +697,7 @@ function protocol.make_client_capabilities()
|
||||
didSave = true,
|
||||
},
|
||||
codeAction = {
|
||||
dynamicRegistration = false,
|
||||
dynamicRegistration = true,
|
||||
|
||||
codeActionLiteralSupport = {
|
||||
codeActionKind = {
|
||||
@@ -714,6 +714,12 @@ function protocol.make_client_capabilities()
|
||||
properties = { 'edit' },
|
||||
},
|
||||
},
|
||||
formatting = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
rangeFormatting = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
completion = {
|
||||
dynamicRegistration = false,
|
||||
completionItem = {
|
||||
@@ -747,6 +753,7 @@ function protocol.make_client_capabilities()
|
||||
},
|
||||
definition = {
|
||||
linkSupport = true,
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
implementation = {
|
||||
linkSupport = true,
|
||||
@@ -755,7 +762,7 @@ function protocol.make_client_capabilities()
|
||||
linkSupport = true,
|
||||
},
|
||||
hover = {
|
||||
dynamicRegistration = false,
|
||||
dynamicRegistration = true,
|
||||
contentFormat = { protocol.MarkupKind.Markdown, protocol.MarkupKind.PlainText },
|
||||
},
|
||||
signatureHelp = {
|
||||
@@ -790,7 +797,7 @@ function protocol.make_client_capabilities()
|
||||
hierarchicalDocumentSymbolSupport = true,
|
||||
},
|
||||
rename = {
|
||||
dynamicRegistration = false,
|
||||
dynamicRegistration = true,
|
||||
prepareSupport = true,
|
||||
},
|
||||
publishDiagnostics = {
|
||||
|
Reference in New Issue
Block a user