Unnamed repository; edit this file 'description' to name the repository.
use made up thingies
bendn 6 weeks ago
parent c61b2b4 · commit aa16402
-rw-r--r--Cargo.lock10
-rw-r--r--crates/rust-analyzer/src/lsp/to_proto.rs24
2 files changed, 19 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 34067c6170..90816540fa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -739,12 +739,6 @@ dependencies = [
]
[[package]]
-name = "hashbrown"
-version = "0.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
-
-[[package]]
name = "hashlink"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -770,7 +764,7 @@ dependencies = [
[[package]]
name = "helix-lsp-types"
version = "0.95.1"
-source = "git+https://github.com/bend-n/helix#9e8efb0a840f362070bd972fd0b75f5c70982202"
+source = "git+https://github.com/bend-n/helix#9ead3f1e21c00cae26d9b27d89c82bcecace2295"
dependencies = [
"bitflags 2.10.0",
"serde",
@@ -1197,7 +1191,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5"
dependencies = [
"equivalent",
- "hashbrown 0.16.0",
+ "hashbrown 0.15.5",
"serde",
"serde_core",
]
diff --git a/crates/rust-analyzer/src/lsp/to_proto.rs b/crates/rust-analyzer/src/lsp/to_proto.rs
index e5b983dcbf..9201dcc35a 100644
--- a/crates/rust-analyzer/src/lsp/to_proto.rs
+++ b/crates/rust-analyzer/src/lsp/to_proto.rs
@@ -64,13 +64,13 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
SymbolKind::Enum => lsp_types::SymbolKind::ENUM,
SymbolKind::Variant => lsp_types::SymbolKind::ENUM_MEMBER,
SymbolKind::Trait => lsp_types::SymbolKind::INTERFACE,
- SymbolKind::Macro
- | SymbolKind::ProcMacro
- | SymbolKind::BuiltinAttr
- | SymbolKind::Attribute
- | SymbolKind::Derive
- | SymbolKind::DeriveHelper => lsp_types::SymbolKind::FUNCTION,
+ SymbolKind::Macro => lsp_types::SymbolKind::MACRO,
+ SymbolKind::ProcMacro => lsp_types::SymbolKind::PROC_MACRO,
+ SymbolKind::BuiltinAttr => lsp_types::SymbolKind::BUILTIN_ATTRIBUTE,
+ SymbolKind::Attribute => lsp_types::SymbolKind::ATTRIBUTE,
+ SymbolKind::Derive => lsp_types::SymbolKind::DERIVE,
SymbolKind::CrateRoot => lsp_types::SymbolKind::PACKAGE,
+ SymbolKind::DeriveHelper => lsp_types::SymbolKind::DERIVE_HELPER,
SymbolKind::Module | SymbolKind::ToolModule => lsp_types::SymbolKind::MODULE,
SymbolKind::TypeAlias | SymbolKind::TypeParam | SymbolKind::SelfType => {
lsp_types::SymbolKind::TYPE_PARAMETER
@@ -1460,7 +1460,17 @@ 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>
{