feat: make filename_impl walker configurable - #7716
Open
sigmaSd wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
adding another config option might look like this diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 1dc3ddac..897ad4aa 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -486,9 +486,9 @@ fn filename_impl<F>(editor: &Editor, input: &str, filter_fn: F) -> Vec<Completio
.hidden(false)
.follow_links(false) // We're scanning over depth 1
.max_depth(Some(1))
- .ignore(config.file_picker.ignore)
- .git_ignore(config.file_picker.git_ignore)
- .git_exclude(config.file_picker.git_exclude)
+ .ignore(config.path_completer.ignore)
+ .git_ignore(config.path_completer.git_ignore)
+ .git_exclude(config.path_completer.git_exclude)
.build()
.filter_map(|file| {
file.ok().and_then(|entry| {
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 20469ae9..94f16b5b 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -260,6 +260,8 @@ pub struct Config {
/// Whether to display infoboxes. Defaults to true.
pub auto_info: bool,
pub file_picker: FilePickerConfig,
+ // we don't use all the fields of FilePickerConfig
+ pub path_completer: FilePickerConfig,
/// Configuration of the statusline elements
pub statusline: StatusLineConfig,
/// Shape for cursor in each mode
@@ -801,6 +803,12 @@ fn default() -> Self {
completion_trigger_len: 2,
auto_info: true,
file_picker: FilePickerConfig::default(),
+ path_completer: FilePickerConfig {
+ ignore: false,
+ git_ignore: false,
+ git_exclude: false,
+ ..Default::default()
+ },
statusline: StatusLineConfig::default(),
cursor_shape: CursorShapeConfig::default(),
true_color: false, |
Contributor
Author
|
If BurntSushi/ripgrep#2566 lands, this PR wont be needed |
Contributor
Author
|
It would be great if this get reviewd, the PR on ripgrep seems to take a while The motivation is with nucleo space f have no lag but using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref #7715
couple of notes: