Add support for excluding files based on .gitignore (#26636)
Closes: #17543 Release Notes: - **New Feature:** Introduced the ability to automatically remove files and directories from the Zed project panel that are specified in `.gitignore`. - **Configuration Option:** This behavior can be controlled via the new `project_panel.hide_gitignore` setting. By setting it to `true`, files listed in `.gitignore` will be excluded from the project panel. - **Toggle:** Ability to toggle this setting using the action `ProjectPanel::ToggleHideGitIgnore` ```json "project_panel": { "hide_gitignore": true }, ``` This results in a cleaner and easier to browse project panel for projects that generate a lot of object files like `xv6-riscv` or `linux` without needing to tweak `file_scan_exclusions` on `settings.json` **Preview:** - With `"project_panel.hide_gitignore": false` (default, this is how zed currently looks)  - With `"project_panel.hide_gitignore": true`  - Action `ProjectPanel::ToggleHideGitIgnore` 
This commit is contained in:
@@ -427,6 +427,8 @@
|
||||
"project_panel": {
|
||||
// Whether to show the project panel button in the status bar
|
||||
"button": true,
|
||||
// Whether to hide the gitignore entries in the project panel.
|
||||
"hide_gitignore": false,
|
||||
// Default width of the project panel.
|
||||
"default_width": 240,
|
||||
// Where to dock the project panel. Can be 'left' or 'right'.
|
||||
|
||||
Reference in New Issue
Block a user