lsp: Add support for call hierarchies (#12556)

* LSP: Add support for call hierarchies

* LSP: Add support for call hierarchies

* LSP: Add support for call hierarchies

* LSP: Jump to call location

Jump to the call site instead of jumping to the definition of the
caller/callee.

* LSP: add tests for the call hierarchy callbacks

* Fix linting error

Co-authored-by: Cédric Barreteau <>
This commit is contained in:
cbarrete
2020-07-18 21:10:09 +02:00
committed by GitHub
parent a02a267f8a
commit 08efa7037e
6 changed files with 217 additions and 0 deletions

View File

@@ -713,6 +713,9 @@ function protocol.make_client_capabilities()
};
applyEdit = true;
};
callHierarchy = {
dynamicRegistration = false;
};
experimental = nil;
}
end
@@ -912,6 +915,7 @@ function protocol.resolve_capabilities(server_capabilities)
general_properties.workspace_symbol = server_capabilities.workspaceSymbolProvider or false
general_properties.document_formatting = server_capabilities.documentFormattingProvider or false
general_properties.document_range_formatting = server_capabilities.documentRangeFormattingProvider or false
general_properties.call_hierarchy = server_capabilities.callHierarchyProvider or false
if server_capabilities.codeActionProvider == nil then
general_properties.code_action = false