mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Add identifier
to pull diagnostic LSP capabilities
This field in the server capabilities instructs the client to maintain the diagnostics received from a `textDocument/diagnostic` pull request as a separate set from other diagnostics: namely those sent with classic "push" diagnostics, `textDocument/publishDiagnostic`. rust-analyzer emits "native" diagnostics (computed by rust-analyzer itself) in pull diagnostics and separately emits cargo-based diagnostics with push, so push and pull diagnostics should be different sets. Setting this field instructs the client to avoid clearing push diagnostics when new pull diagnostics arrive and vice versa.
This commit is contained in:
parent
7273d714af
commit
c9fdc48e86
@ -165,7 +165,7 @@ pub fn server_capabilities(config: &Config) -> ServerCapabilities {
|
||||
})),
|
||||
diagnostic_provider: Some(lsp_types::DiagnosticServerCapabilities::Options(
|
||||
lsp_types::DiagnosticOptions {
|
||||
identifier: None,
|
||||
identifier: Some("rust-analyzer".to_owned()),
|
||||
inter_file_dependencies: true,
|
||||
// FIXME
|
||||
workspace_diagnostics: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user