Skip to content

Commit

Permalink
fix - and _
Browse files Browse the repository at this point in the history
  • Loading branch information
frederik-uni committed Sep 29, 2024
1 parent 0a8740d commit fccbe51
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargotom"
version = "0.13.4"
version = "0.13.5"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/crate_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl CratesIoStorage {
let lock = self.data.read().await;
if let Some(v) = &*lock {
let search = v
.predictive_search(query.to_lowercase())
.predictive_search(query.to_lowercase().replace("-", "").replace("_", ""))
.map(|(_, a): (String, &Vec<_>)| a)
.collect::<Vec<_>>()
.clone();
Expand Down
7 changes: 6 additions & 1 deletion src/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,12 @@ impl LanguageServer for Backend {
},
)),
completion_provider: Some(CompletionOptions {
trigger_characters: Some(vec!["\"".to_string(), ".".to_string(), ":".to_string()]),
trigger_characters: Some(vec![
"\"".to_string(),
".".to_string(),
":".to_string(),
"-".to_string(),
]),
..Default::default()
}),
signature_help_provider: Some(SignatureHelpOptions {
Expand Down

0 comments on commit fccbe51

Please sign in to comment.