aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/Cargo.toml2
-rw-r--r--crates/rust-analyzer/src/to_proto.rs21
2 files changed, 17 insertions, 6 deletions
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 56c51486f..436f5041b 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -21,7 +21,7 @@ env_logger = { version = "0.8.1", default-features = false }
21itertools = "0.9.0" 21itertools = "0.9.0"
22jod-thread = "0.1.0" 22jod-thread = "0.1.0"
23log = "0.4.8" 23log = "0.4.8"
24lsp-types = { version = "0.83.1", features = ["proposed"] } 24lsp-types = { version = "0.84.0", features = ["proposed"] }
25parking_lot = "0.11.0" 25parking_lot = "0.11.0"
26pico-args = "0.3.1" 26pico-args = "0.3.1"
27oorandom = "11.1.2" 27oorandom = "11.1.2"
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 2f35425bb..2052b800c 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -629,12 +629,21 @@ pub(crate) fn resource_op(
629 match file_system_edit { 629 match file_system_edit {
630 FileSystemEdit::CreateFile { anchor, dst } => { 630 FileSystemEdit::CreateFile { anchor, dst } => {
631 let uri = snap.anchored_path(anchor, &dst); 631 let uri = snap.anchored_path(anchor, &dst);
632 lsp_types::ResourceOp::Create(lsp_types::CreateFile { uri, options: None }) 632 lsp_types::ResourceOp::Create(lsp_types::CreateFile {
633 uri,
634 options: None,
635 annotation: None,
636 })
633 } 637 }
634 FileSystemEdit::MoveFile { src, anchor, dst } => { 638 FileSystemEdit::MoveFile { src, anchor, dst } => {
635 let old_uri = snap.file_id_to_url(src); 639 let old_uri = snap.file_id_to_url(src);
636 let new_uri = snap.anchored_path(anchor, &dst); 640 let new_uri = snap.anchored_path(anchor, &dst);
637 lsp_types::ResourceOp::Rename(lsp_types::RenameFile { old_uri, new_uri, options: None }) 641 lsp_types::ResourceOp::Rename(lsp_types::RenameFile {
642 old_uri,
643 new_uri,
644 options: None,
645 annotation: None,
646 })
638 } 647 }
639 } 648 }
640} 649}
@@ -684,9 +693,11 @@ impl From<lsp_ext::SnippetWorkspaceEdit> for lsp_types::WorkspaceEdit {
684 edits: edit 693 edits: edit
685 .edits 694 .edits
686 .into_iter() 695 .into_iter()
687 .map(|edit| lsp_types::TextEdit { 696 .map(|edit| {
688 range: edit.range, 697 lsp_types::OneOf::Left(lsp_types::TextEdit {
689 new_text: edit.new_text, 698 range: edit.range,
699 new_text: edit.new_text,
700 })
690 }) 701 })
691 .collect(), 702 .collect(),
692 }, 703 },