Match progress token's prefix to detect disk-based diagnostic progress
The new version of rust-analyzer changed the disk-based diagnostic token to `rust-analyzer/checkOnSave/0`. The trailing number could be different from 0 when there are multiple Rust projects open using the same rust-analyzer instance. As such, with this commit we will perform a prefix match as opposed to a strict equality check when detecting a disk-based diagnostics progress token.
This commit is contained in:
parent
af74d5409a
commit
19adfdf8bb
3 changed files with 10 additions and 5 deletions
|
@ -93,7 +93,7 @@ impl LspAdapter for RustLspAdapter {
|
|||
}
|
||||
|
||||
async fn disk_based_diagnostics_progress_token(&self) -> Option<String> {
|
||||
Some("rustAnalyzer/cargo check".into())
|
||||
Some("rust-analyzer/checkOnSave".into())
|
||||
}
|
||||
|
||||
async fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue