Respect LSP goToTypeDefinition server capability
This commit is contained in:
parent
e3f319467a
commit
11dbbcc9dd
1 changed files with 8 additions and 0 deletions
|
@ -487,6 +487,14 @@ impl LspCommand for GetTypeDefinition {
|
||||||
type LspRequest = lsp::request::GotoTypeDefinition;
|
type LspRequest = lsp::request::GotoTypeDefinition;
|
||||||
type ProtoRequest = proto::GetTypeDefinition;
|
type ProtoRequest = proto::GetTypeDefinition;
|
||||||
|
|
||||||
|
fn check_capabilities(&self, capabilities: &ServerCapabilities) -> bool {
|
||||||
|
match &capabilities.type_definition_provider {
|
||||||
|
None => false,
|
||||||
|
Some(lsp::TypeDefinitionProviderCapability::Simple(false)) => false,
|
||||||
|
_ => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn to_lsp(
|
fn to_lsp(
|
||||||
&self,
|
&self,
|
||||||
path: &Path,
|
path: &Path,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue