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.

lsp: Use replace edits for completions (#23490)

Piotr Osiewicz3c0d05e362b6
diff --git a/crates/project/src/lsp_command.rs b/crates/project/src/lsp_command.rs
index e69b7b95b04..edb227cf8f0 100644
--- a/crates/project/src/lsp_command.rs
+++ b/crates/project/src/lsp_command.rs
@@ -2123,7 +2123,7 @@ pub(crate) fn parse_completion_text_edit(
}
lsp::CompletionTextEdit::InsertAndReplace(edit) => {
- let range = range_from_lsp(edit.insert);
+ let range = range_from_lsp(edit.replace);
let start = snapshot.clip_point_utf16(range.start, Bias::Left);
let end = snapshot.clip_point_utf16(range.end, Bias::Left);