Add support for the "..." entry in hidden_files (#64484)

## Objective

Let projects add hidden file patterns without repeating defaults or
patterns inherited from user settings.

Part of
[#64399](https://github.com/zed-industries/zed/discussions/64399).

## Solution

Extend the `"..."` behavior from #62769, #64222, and #64440 to
`hidden_files`. `"..."` includes the resolved inherited list, omitting
it replaces the list, and `[]` clears it. Duplicate entries retain their
first occurrence.

The default remains `["**/.*"]`, and `project_panel.hide_hidden` still
controls visibility.

## Testing

Tested on macOS with settings merge, worktree integration, and Settings
Editor metadata tests.

To check manually, configure different user and project hidden file
patterns and enable `project_panel.hide_hidden`. Include `"..."` to
retain inherited patterns, then repeat without it and with `[]` to
verify replacement and clearing.

## Self-Review Checklist:

- [x] I’ve reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed’s UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Added support for `"..."` in `hidden_files` so project settings can
extend inherited hidden-file patterns.
This commit is contained in:
Dom Porada authored and GitHub committed 2026-09-19 09:32:40 +00:00
1 parent 2c11b68c25
commit 94436f0873
5 files changed
+256 -20

No files matched your search

+13 -13
View File
@@ -2934,29 +2934,29 @@ Example:
## Hidden Files {#hidden-files}
- Description: Glob patterns that mark files and folders as hidden in the Project Panel.
- Setting: `hidden_files`
- Default: `["**/.*"]`
**Options**
List of `string` glob patterns.
The default matches files and folders whose names start with a dot. Files inside matching folders are also considered hidden.
The [Project Panel](../project-panel.md#hiding-files) shows hidden entries by default. To hide them, enable **Hide Hidden** under **Panels > Project Panel** in the Settings Editor, or set `project_panel.hide_hidden` to `true`.
Customizing `hidden_files` replaces the default patterns. To hide `*.log` files while keeping dotfiles and dotfolders hidden, add this to your `settings.json`:
- Description: Treat files and folders matching these glob patterns as hidden, including files inside matching folders. To [hide these entries](../project-panel.md#hiding-files), run `project panel: toggle hide hidden` from the command palette or set `project_panel.hide_hidden` to `true`.
- Default:
```json [settings]
{
"hidden_files": ["**/*.log", "**/.*"],
"hidden_files": ["**/.*"]
}
```
Use `"..."` to add patterns without repeating Zed’s defaults. In project settings, it extends the user or parent configuration value. Omit `"..."` to replace the inherited list.
```json [settings]
{
"hidden_files": ["**/*.log", "..."],
"project_panel": {
"hide_hidden": true
}
}
```
Inherited patterns are inserted at `"..."`, and duplicates keep their first occurrence.
## Indent Guides
- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.