Query multiple LSPs for more types of requests (#29359)

This fixes an issue where lower-priority language servers cannot provide
contentful responses even when the first capable server returned empty
responses.

Most of the diffs are copypasted since the existing implementations were
also copypasted.

Release Notes:

- Improved Go to Definition / Declaration / Type Definition /
Implementation and Find All References to include all results from
different language servers
This commit is contained in:
Iha Shin (신의하) 2025-07-03 02:51:19 +09:00 committed by GitHub
parent 105acacff9
commit 5f70a9cf59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 617 additions and 93 deletions

View file

@ -21944,10 +21944,10 @@ impl SemanticsProvider for Entity<Project> {
cx: &mut App,
) -> Option<Task<Result<Vec<LocationLink>>>> {
Some(self.update(cx, |project, cx| match kind {
GotoDefinitionKind::Symbol => project.definition(&buffer, position, cx),
GotoDefinitionKind::Declaration => project.declaration(&buffer, position, cx),
GotoDefinitionKind::Type => project.type_definition(&buffer, position, cx),
GotoDefinitionKind::Implementation => project.implementation(&buffer, position, cx),
GotoDefinitionKind::Symbol => project.definitions(&buffer, position, cx),
GotoDefinitionKind::Declaration => project.declarations(&buffer, position, cx),
GotoDefinitionKind::Type => project.type_definitions(&buffer, position, cx),
GotoDefinitionKind::Implementation => project.implementations(&buffer, position, cx),
}))
}