Skip to content

Commit

Permalink
Always ignore the .git directory in file picker
Browse files Browse the repository at this point in the history
Some users (including myself) want to turn off filtering of files
prefixed with `.`, as they are often useful to edit. For example, `.env`
files, configuration for linters `.eslint.json` and the like.
  • Loading branch information
EpocSquadron committed Jan 30, 2022
1 parent e2833b5 commit 2952234
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi
.git_ignore(config.file_picker.git_ignore)
.git_global(config.file_picker.git_global)
.git_exclude(config.file_picker.git_exclude)
.max_depth(config.file_picker.max_depth);
.max_depth(config.file_picker.max_depth)
// We always want to ignore the .git directory, otherwise if
// `ignore` is turned off above, we end up with a lot of noise
// in our picker.
.filter_entry(|entry| entry.file_name() != ".git");

let walk_builder = match type_builder.add(
"compressed",
Expand Down

0 comments on commit 2952234

Please sign in to comment.