Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a fuzzy matcher for commands #1386

Merged
merged 3 commits into from
Dec 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Take Clippy up on its suggestion
  • Loading branch information
stuarth committed Dec 27, 2021
commit 2136764323b80224984ffbe0fef8ee243956c2a9
2 changes: 1 addition & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3046,7 +3046,7 @@ pub mod cmd {
}

static FUZZY_MATCHER: Lazy<fuzzy_matcher::skim::SkimMatcherV2> =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: Since this is only used inside fn command_mode I'd move the definition inside the fn body, that way it's scoped to the command.

Lazy::new(|| fuzzy_matcher::skim::SkimMatcherV2::default());
Lazy::new(fuzzy_matcher::skim::SkimMatcherV2::default);

fn command_mode(cx: &mut Context) {
let mut prompt = Prompt::new(
Expand Down