Skip to content

Commit c0b6d86

Browse files
authored
go: Do not fill out root_uri in initialization params to prevent stale notifications (zed-industries#25644)
Closes zed-industries#25381 Release Notes: - N/A
1 parent 39728cf commit c0b6d86

File tree

1 file changed

+9
-1
lines changed
  • crates/languages/src

1 file changed

+9
-1
lines changed

crates/languages/src/go.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use futures::StreamExt;
55
use gpui::{App, AsyncApp, Task};
66
use http_client::github::latest_github_release;
77
pub use language::*;
8-
use lsp::{LanguageServerBinary, LanguageServerName};
8+
use lsp::{InitializeParams, LanguageServerBinary, LanguageServerName};
99
use project::Fs;
1010
use regex::Regex;
1111
use serde_json::json;
@@ -373,6 +373,14 @@ impl super::LspAdapter for GoLspAdapter {
373373
filter_range,
374374
})
375375
}
376+
fn prepare_initialize_params(
377+
&self,
378+
mut original: InitializeParams,
379+
) -> Result<InitializeParams> {
380+
#[allow(deprecated)]
381+
let _ = original.root_uri.take();
382+
Ok(original)
383+
}
376384
}
377385

378386
fn parse_version_output(output: &Output) -> Result<&str> {

0 commit comments

Comments
 (0)