# Add support for \`"\.\.\."\` in \`edit_predictions.disabled_globs\` \(\#64540\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5a137cbc9b3d0ef0eb5e0ff5f705187b05bc9449)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5a137cbc9b3d0ef0eb5e0ff5f705187b05bc9449

Requested commit: 5a137cbc9b3d0ef0eb5e0ff5f705187b05bc9449

Commit: 5a137cbc9b3d0ef0eb5e0ff5f705187b05bc9449

Tree: bee5cd2d1f84938386b2c9fb7b50faa5d6b8716c

Author: Dom Porada

Committer: GitHub

## Message

```
Add support for `"..."` in `edit_predictions.disabled_globs` (#64540)

## Objective

Let users and projects add edit prediction exclusion patterns without
repeating defaults or inherited patterns.

Part of #64399.

## Solution

Extend the `"..."` convention from #62769, #64222, #64440, and #64484 to
`edit_predictions.disabled_globs` using `SplicingVec`. Inherited
patterns are inserted at `"..."`, and duplicates retain their first
occurrence. Omitting the marker replaces the list, `[]` clears it, and
omitting the setting preserves inheritance.

Opening an absent setting now initializes it with `["..."]` instead of
clearing inherited patterns, and the selection is located by parsing the
JSON instead of a regex, so a commented-out or nested `"disabled_globs"`
can no longer capture it. Cursor imports append `"..."` like the
`files.exclude` import does, so Zed's sensitive-file defaults survive an
import; empty lists and empty or literal `"..."` entries are dropped,
matching `enabled_patterns`.

## Testing

Tested on macOS with settings merge and loading tests, Cursor import
tests, the UI settings update and selection path (including
commented-out and nested decoy keys), the new `settings_json` key-path
lookup, and Copilot integration coverage.

To check manually, configure custom disabled patterns alongside `"..."`
and confirm that both custom patterns and inherited sensitive-file
patterns remain disabled. Repeat without `"..."` and with `[]` to verify
replacement and clearing. Opening the setting when it is absent should
preserve inherited patterns.

## 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 `edit_predictions.disabled_globs` so
custom patterns can extend inherited exclusions, and fixed "Configure
Excluded Files" selecting the wrong list when a commented-out
`disabled_globs` precedes it.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
```

## Parents

- [656e3aed84e0febc2107d31f5752df157d83bb63](https://git.cafe/gitcafe/zed/commit/656e3aed84e0febc2107d31f5752df157d83bb63?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5a137cbc9b3d0ef0eb5e0ff5f705187b05bc9449?format=markdown)
