Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.lock26
-rw-r--r--crates/rust-analyzer/src/lsp/ext.rs16
-rw-r--r--crates/rust-analyzer/src/lsp/to_proto.rs26
3 files changed, 15 insertions, 53 deletions
diff --git a/Cargo.lock b/Cargo.lock
index bf6ab6476f..a6d1b8b8c6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -805,7 +805,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "helix-lsp-types"
version = "0.95.1"
-source = "git+https://git.bendn.org/helix#a3cbb48f2fd800fb481f122387f4b6c5c93a6cb2"
+source = "git+https://git.bendn.org/helix#6a9523aefc18ffebbb42854df94ad4e9bfc6133c"
dependencies = [
"bitflags 2.11.0",
"serde",
@@ -1319,9 +1319,9 @@ checksum = "a037eddb7d28de1d0fc42411f501b53b75838d313908078d6698d064f3029b24"
[[package]]
name = "js-sys"
-version = "0.3.88"
+version = "0.3.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7e709f3e3d22866f9c25b3aff01af289b18422cc8b4262fb19103ee80fe513d"
+checksum = "f4eacb0641a310445a4c513f2a5e23e19952e269c6a38887254d5f837a305506"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -3329,9 +3329,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
-version = "0.2.111"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec1adf1535672f5b7824f817792b1afd731d7e843d2d04ec8f27e8cb51edd8ac"
+checksum = "05d7d0fce354c88b7982aec4400b3e7fcf723c32737cef571bd165f7613557ee"
dependencies = [
"cfg-if",
"once_cell",
@@ -3342,9 +3342,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.111"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19e638317c08b21663aed4d2b9a2091450548954695ff4efa75bff5fa546b3b1"
+checksum = "55839b71ba921e4f75b674cb16f843f4b1f3b26ddfcb3454de1cf65cc021ec0f"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -3352,9 +3352,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.111"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c64760850114d03d5f65457e96fc988f11f01d38fbaa51b254e4ab5809102af"
+checksum = "caf2e969c2d60ff52e7e98b7392ff1588bffdd1ccd4769eba27222fd3d621571"
dependencies = [
"bumpalo",
"proc-macro2",
@@ -3365,9 +3365,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.111"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60eecd4fe26177cfa3339eb00b4a36445889ba3ad37080c2429879718e20ca41"
+checksum = "0861f0dcdf46ea819407495634953cdcc8a8c7215ab799a7a7ce366be71c7b30"
dependencies = [
"unicode-ident",
]
@@ -3408,9 +3408,9 @@ dependencies = [
[[package]]
name = "web-sys"
-version = "0.3.88"
+version = "0.3.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d6bb20ed2d9572df8584f6dc81d68a41a625cadc6f15999d649a70ce7e3597a"
+checksum = "10053fbf9a374174094915bbce141e87a6bf32ecd9a002980db4b638405e8962"
dependencies = [
"js-sys",
"wasm-bindgen",
diff --git a/crates/rust-analyzer/src/lsp/ext.rs b/crates/rust-analyzer/src/lsp/ext.rs
index e6493eefef..174514d8a0 100644
--- a/crates/rust-analyzer/src/lsp/ext.rs
+++ b/crates/rust-analyzer/src/lsp/ext.rs
@@ -10,8 +10,8 @@ use std::ops;
use lsp_types::Url;
use lsp_types::request::Request;
-use lsp_types::{
- CodeActionKind, DocumentOnTypeFormattingParams, PartialResultParams, Position, Range,
+pub use lsp_types::{
+ SnippetTextEdit, CodeActionKind, DocumentOnTypeFormattingParams, PartialResultParams, Position, Range,
TextDocumentIdentifier, WorkDoneProgressParams, notification::Notification,
};
use paths::Utf8PathBuf;
@@ -638,18 +638,6 @@ pub struct SnippetTextDocumentEdit {
pub edits: Vec<SnippetTextEdit>,
}
-#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct SnippetTextEdit {
- pub range: Range,
- pub new_text: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub insert_text_format: Option<lsp_types::InsertTextFormat>,
- /// The annotation id if this is an annotated
- #[serde(skip_serializing_if = "Option::is_none")]
- pub annotation_id: Option<lsp_types::ChangeAnnotationIdentifier>,
-}
-
pub enum HoverRequest {}
impl Request for HoverRequest {
diff --git a/crates/rust-analyzer/src/lsp/to_proto.rs b/crates/rust-analyzer/src/lsp/to_proto.rs
index 9201dcc35a..5a4d800274 100644
--- a/crates/rust-analyzer/src/lsp/to_proto.rs
+++ b/crates/rust-analyzer/src/lsp/to_proto.rs
@@ -1460,32 +1460,6 @@ impl From<lsp_ext::SnippetWorkspaceEdit> for lsp_types::WorkspaceEdit {
}
}
}
-impl From<crate::lsp::ext::SnippetTextEdit> for lsp_types::SnippetTextEdit {
- fn from(
- lsp_ext::SnippetTextEdit { annotation_id, insert_text_format, new_text, range }: lsp_ext::SnippetTextEdit,
- ) -> lsp_types::SnippetTextEdit {
- lsp_types::SnippetTextEdit {
- text_edit: lsp_types::TextEdit { new_text, range },
- insert_text_format,
- annotation_id,
- }
- }
-}
-impl From<lsp_ext::SnippetTextEdit>
- for lsp_types::OneOf<lsp_types::TextEdit, lsp_types::AnnotatedTextEdit>
-{
- fn from(
- lsp_ext::SnippetTextEdit { annotation_id, insert_text_format:_, new_text, range }: lsp_ext::SnippetTextEdit,
- ) -> Self {
- match annotation_id {
- Some(annotation_id) => lsp_types::OneOf::Right(lsp_types::AnnotatedTextEdit {
- text_edit: lsp_types::TextEdit { range, new_text },
- annotation_id,
- }),
- None => lsp_types::OneOf::Left(lsp_types::TextEdit { range, new_text }),
- }
- }
-}
pub(crate) fn call_hierarchy_item(
snap: &GlobalStateSnapshot,