mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(lsp): enable additional capabilities (#15470)
Declaration, type-definition, and implementation capabilities were previously disabled if the client received table output from the server capabilities. The workDoneProgress capability is sent for many servers for all supported capabilities as part of this table. Default to setting capability to table instead of false.
This commit is contained in:
parent
a92e83ac14
commit
5d633546bf
@ -1003,8 +1003,7 @@ function protocol.resolve_capabilities(server_capabilities)
|
||||
elseif type(server_capabilities.declarationProvider) == 'boolean' then
|
||||
general_properties.declaration = server_capabilities.declarationProvider
|
||||
elseif type(server_capabilities.declarationProvider) == 'table' then
|
||||
-- TODO: support more detailed declarationProvider options.
|
||||
general_properties.declaration = false
|
||||
general_properties.declaration = server_capabilities.declarationProvider
|
||||
else
|
||||
error("The server sent invalid declarationProvider")
|
||||
end
|
||||
@ -1014,8 +1013,7 @@ function protocol.resolve_capabilities(server_capabilities)
|
||||
elseif type(server_capabilities.typeDefinitionProvider) == 'boolean' then
|
||||
general_properties.type_definition = server_capabilities.typeDefinitionProvider
|
||||
elseif type(server_capabilities.typeDefinitionProvider) == 'table' then
|
||||
-- TODO: support more detailed typeDefinitionProvider options.
|
||||
general_properties.type_definition = false
|
||||
general_properties.type_definition = server_capabilities.typeDefinitionProvider
|
||||
else
|
||||
error("The server sent invalid typeDefinitionProvider")
|
||||
end
|
||||
@ -1025,8 +1023,7 @@ function protocol.resolve_capabilities(server_capabilities)
|
||||
elseif type(server_capabilities.implementationProvider) == 'boolean' then
|
||||
general_properties.implementation = server_capabilities.implementationProvider
|
||||
elseif type(server_capabilities.implementationProvider) == 'table' then
|
||||
-- TODO(ashkan) support more detailed implementation options.
|
||||
general_properties.implementation = false
|
||||
general_properties.implementation = server_capabilities.implementationProvider
|
||||
else
|
||||
error("The server sent invalid implementationProvider")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user