aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorDheepak Krishnamurthy <me@kdheepak.com>2020-06-04 06:52:44 -0600
committerGitHub <noreply@github.com>2020-06-04 08:52:44 -0400
commit6f4f38cd54693ca99c887756e6179cc0775377d0 (patch)
tree04b42466117f14f06c92b69f8a6afc8bc991c70d /runtime/lua/vim/lsp.lua
parentac5a3f2c56775040a1b7de438cfd592c0dc26400 (diff)
downloadrneovim-6f4f38cd54693ca99c887756e6179cc0775377d0.tar.gz
rneovim-6f4f38cd54693ca99c887756e6179cc0775377d0.tar.bz2
rneovim-6f4f38cd54693ca99c887756e6179cc0775377d0.zip
lsp: Add check for `declaration` and `typeDefinition` support in vim lsp server before making `request` (#12421)
* Add check for typeDefinition support in vim lsp server * Check for typeDefinitionProvider in server * Check for declarationProvider in server * Add check for client support * Fix typo
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 84812b8c64..2fbc51481f 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -507,6 +507,8 @@ function lsp.start_client(config)
or (not client.resolved_capabilities.signature_help and method == 'textDocument/signatureHelp')
or (not client.resolved_capabilities.goto_definition and method == 'textDocument/definition')
or (not client.resolved_capabilities.implementation and method == 'textDocument/implementation')
+ or (not client.resolved_capabilities.declaration and method == 'textDocument/declaration')
+ or (not client.resolved_capabilities.type_definition and method == 'textDocument/typeDefinition')
or (not client.resolved_capabilities.document_symbol and method == 'textDocument/documentSymbol')
or (not client.resolved_capabilities.workspace_symbol and method == 'textDocument/workspaceSymbol')
then