Pull diagnostics fixes (#32242)
Follow-up of https://github.com/zed-industries/zed/pull/19230 * starts to send `result_id` in pull requests to allow servers to reply with non-full results * fixes a bug where disk-based diagnostics were offset after pulling the diagnostics * fixes a bug due to which pull diagnostics could not be disabled * uses better names and comments for the workspace pull diagnostics part Release Notes: - N/A
This commit is contained in:
parent
508b604b67
commit
380d8c5662
15 changed files with 272 additions and 109 deletions
|
@ -317,7 +317,7 @@ pub enum Event {
|
|||
SnippetEdit(BufferId, Vec<(lsp::Range, Snippet)>),
|
||||
ExpandedAllForEntry(WorktreeId, ProjectEntryId),
|
||||
AgentLocationChanged,
|
||||
RefreshDocumentsDiagnostics,
|
||||
PullWorkspaceDiagnostics,
|
||||
}
|
||||
|
||||
pub struct AgentLocationChanged;
|
||||
|
@ -2814,9 +2814,7 @@ impl Project {
|
|||
}
|
||||
LspStoreEvent::RefreshInlayHints => cx.emit(Event::RefreshInlayHints),
|
||||
LspStoreEvent::RefreshCodeLens => cx.emit(Event::RefreshCodeLens),
|
||||
LspStoreEvent::RefreshDocumentsDiagnostics => {
|
||||
cx.emit(Event::RefreshDocumentsDiagnostics)
|
||||
}
|
||||
LspStoreEvent::PullWorkspaceDiagnostics => cx.emit(Event::PullWorkspaceDiagnostics),
|
||||
LspStoreEvent::LanguageServerPrompt(prompt) => {
|
||||
cx.emit(Event::LanguageServerPrompt(prompt.clone()))
|
||||
}
|
||||
|
@ -3732,6 +3730,7 @@ impl Project {
|
|||
&mut self,
|
||||
language_server_id: LanguageServerId,
|
||||
source_kind: DiagnosticSourceKind,
|
||||
result_id: Option<String>,
|
||||
params: lsp::PublishDiagnosticsParams,
|
||||
disk_based_sources: &[String],
|
||||
cx: &mut Context<Self>,
|
||||
|
@ -3740,6 +3739,7 @@ impl Project {
|
|||
lsp_store.update_diagnostics(
|
||||
language_server_id,
|
||||
params,
|
||||
result_id,
|
||||
source_kind,
|
||||
disk_based_sources,
|
||||
cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue