Be more lenient when dealing with rust-analyzer's flycheck commands (#36782)

Flycheck commands are global and makes sense to fall back to looking up
project's rust-analyzer even if the commands are run on a non-rust
buffer. If multiple rust-analyzers are found in the project, avoid
ambiguous commands and bail (as before).

Closes #ISSUE

Release Notes:

- Made it possible to run rust-analyzer's flycheck actions from anywhere
in the project
This commit is contained in:
Kirill Bulatov 2025-08-23 01:55:50 +03:00 committed by GitHub
parent 153724aad3
commit d24cad30f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 114 additions and 64 deletions

View file

@ -834,21 +834,19 @@ message LspRunnable {
message LspExtCancelFlycheck {
uint64 project_id = 1;
uint64 buffer_id = 2;
uint64 language_server_id = 3;
uint64 language_server_id = 2;
}
message LspExtRunFlycheck {
uint64 project_id = 1;
uint64 buffer_id = 2;
optional uint64 buffer_id = 2;
uint64 language_server_id = 3;
bool current_file_only = 4;
}
message LspExtClearFlycheck {
uint64 project_id = 1;
uint64 buffer_id = 2;
uint64 language_server_id = 3;
uint64 language_server_id = 2;
}
message LspDiagnosticRelatedInformation {