Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Skip buffer registration if lsp data should be ignored (#42190)

Kirill Bulatov278fe91a9aa6
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 646e5ba4ab9..5f120fb9642 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -22177,6 +22177,10 @@ impl Editor {
}
fn register_buffer(&mut self, buffer_id: BufferId, cx: &mut Context<Self>) {
+ if self.ignore_lsp_data() {
+ return;
+ }
+
if !self.registered_buffers.contains_key(&buffer_id)
&& let Some(project) = self.project.as_ref()
{
diff --git a/crates/editor/src/inlays/inlay_hints.rs b/crates/editor/src/inlays/inlay_hints.rs
index 4fd673a8d2f..41920d3645c 100644
--- a/crates/editor/src/inlays/inlay_hints.rs
+++ b/crates/editor/src/inlays/inlay_hints.rs
@@ -266,7 +266,7 @@ impl Editor {
reason: InlayHintRefreshReason,
cx: &mut Context<Self>,
) {
- if !self.mode.is_full() || self.inlay_hints.is_none() {
+ if self.ignore_lsp_data() || self.inlay_hints.is_none() {
return;
}
let Some(semantics_provider) = self.semantics_provider() else {