Enable type definition capability in fake LSPs in tests

This commit is contained in:
Max Brunsfeld 2023-06-08 12:09:37 -07:00
parent e0dd9e4185
commit a7f06f962b
2 changed files with 3 additions and 0 deletions

View file

@ -312,6 +312,7 @@ mod tests {
let mut cx = EditorLspTestContext::new_rust(
lsp::ServerCapabilities {
hover_provider: Some(lsp::HoverProviderCapability::Simple(true)),
type_definition_provider: Some(lsp::TypeDefinitionProviderCapability::Simple(true)),
..Default::default()
},
cx,

View file

@ -792,6 +792,8 @@ impl LanguageServer {
code_action_provider: Some(CodeActionProviderCapability::Simple(true)),
document_formatting_provider: Some(OneOf::Left(true)),
document_range_formatting_provider: Some(OneOf::Left(true)),
definition_provider: Some(OneOf::Left(true)),
type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)),
..Default::default()
}
}