diff --git a/Cargo.lock b/Cargo.lock index f07c08a77bc..f8806794979 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -715,7 +715,6 @@ dependencies = [ "syntax", "test-utils", "text-edit", - "unicode-ident", ] [[package]] diff --git a/crates/ide-completion/Cargo.toml b/crates/ide-completion/Cargo.toml index c06ac55aae3..092fb303668 100644 --- a/crates/ide-completion/Cargo.toml +++ b/crates/ide-completion/Cargo.toml @@ -17,7 +17,6 @@ itertools = "0.10.5" once_cell = "1.17.0" smallvec.workspace = true -unicode-ident = "1.0.0" # local deps diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs index 92782d1e807..0309952c29a 100644 --- a/crates/ide-completion/src/item.rs +++ b/crates/ide-completion/src/item.rs @@ -437,8 +437,8 @@ pub(crate) fn build(self, db: &RootDatabase) -> CompletionItem { // `PartialOrd` because it has an alias of ">". .filter(|alias| { let mut chars = alias.chars(); - chars.next().is_some_and(unicode_ident::is_xid_start) - && chars.all(unicode_ident::is_xid_continue) + chars.next().is_some_and(char::is_alphabetic) + && chars.all(|c| c.is_alphanumeric() || c == '_') }) // Deliberately concatenated without separators as adding separators e.g. // `alias1, alias2` results in LSP clients continuing to display the completion even