diff options
-rw-r--r-- | Cargo.lock | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 21 |
3 files changed, 19 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock index edadd1057..27bf16c3b 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -865,9 +865,9 @@ dependencies = [ | |||
865 | 865 | ||
866 | [[package]] | 866 | [[package]] |
867 | name = "lsp-types" | 867 | name = "lsp-types" |
868 | version = "0.83.1" | 868 | version = "0.84.0" |
869 | source = "registry+https://github.com/rust-lang/crates.io-index" | 869 | source = "registry+https://github.com/rust-lang/crates.io-index" |
870 | checksum = "c4e79f39834b97271f9f5ecec573e42c7d9c5bdbd2620b30a851054ece6aab6d" | 870 | checksum = "3b95be71fe205e44de754185bcf86447b65813ce1ceb298f8d3793ade5fff08d" |
871 | dependencies = [ | 871 | dependencies = [ |
872 | "base64", | 872 | "base64", |
873 | "bitflags", | 873 | "bitflags", |
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 } | |||
21 | itertools = "0.9.0" | 21 | itertools = "0.9.0" |
22 | jod-thread = "0.1.0" | 22 | jod-thread = "0.1.0" |
23 | log = "0.4.8" | 23 | log = "0.4.8" |
24 | lsp-types = { version = "0.83.1", features = ["proposed"] } | 24 | lsp-types = { version = "0.84.0", features = ["proposed"] } |
25 | parking_lot = "0.11.0" | 25 | parking_lot = "0.11.0" |
26 | pico-args = "0.3.1" | 26 | pico-args = "0.3.1" |
27 | oorandom = "11.1.2" | 27 | oorandom = "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 | }, |