Add helix-specific ignore files (#8099)

pull/8591/head
Paul Olteanu 1 year ago committed by GitHub
parent 6d598d3239
commit 8d44459c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2184,7 +2184,10 @@ fn global_search(cx: &mut Context) {
let searcher = SearcherBuilder::new() let searcher = SearcherBuilder::new()
.binary_detection(BinaryDetection::quit(b'\x00')) .binary_detection(BinaryDetection::quit(b'\x00'))
.build(); .build();
WalkBuilder::new(search_root)
let mut walk_builder = WalkBuilder::new(search_root);
walk_builder
.hidden(file_picker_config.hidden) .hidden(file_picker_config.hidden)
.parents(file_picker_config.parents) .parents(file_picker_config.parents)
.ignore(file_picker_config.ignore) .ignore(file_picker_config.ignore)
@ -2195,9 +2198,13 @@ fn global_search(cx: &mut Context) {
.max_depth(file_picker_config.max_depth) .max_depth(file_picker_config.max_depth)
.filter_entry(move |entry| { .filter_entry(move |entry| {
filter_picker_entry(entry, &absolute_root, dedup_symlinks) filter_picker_entry(entry, &absolute_root, dedup_symlinks)
}) });
.build_parallel()
.run(|| { walk_builder
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"));
walk_builder.add_custom_ignore_filename(".helix/ignore");
walk_builder.build_parallel().run(|| {
let mut searcher = searcher.clone(); let mut searcher = searcher.clone();
let matcher = matcher.clone(); let matcher = matcher.clone();
let injector = injector_.clone(); let injector = injector_.clone();

@ -177,6 +177,9 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> Picker
.max_depth(config.file_picker.max_depth) .max_depth(config.file_picker.max_depth)
.filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks)); .filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks));
walk_builder.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"));
walk_builder.add_custom_ignore_filename(".helix/ignore");
// We want to exclude files that the editor can't handle yet // We want to exclude files that the editor can't handle yet
let mut type_builder = TypesBuilder::new(); let mut type_builder = TypesBuilder::new();
type_builder type_builder

Loading…
Cancel
Save