Skip to content

Commit

Permalink
Document file_scan_inclusions and make consistent with default.json (
Browse files Browse the repository at this point in the history
…#25046)

Release Notes:

- N/A
  • Loading branch information
mgsloan authored Feb 17, 2025
1 parent bb53ad9 commit 888dc0b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 6 additions & 7 deletions assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,8 @@
// Whether to show warnings or not by default.
"include_warnings": true
},
// Add files or globs of files that will be excluded by Zed entirely:
// they will be skipped during FS scan(s), file tree and file search
// will lack the corresponding file entries. Overrides `file_scan_inclusions`.
// Files or globs of files that will be excluded by Zed entirely. They will be skipped during file
// scans, file searches, and not be displayed in the project file tree. Takes precedence over `file_scan_inclusions`.
"file_scan_exclusions": [
"**/.git",
"**/.svn",
Expand All @@ -750,10 +749,10 @@
"**/.classpath",
"**/.settings"
],
// Add files or globs of files that will be included by Zed, even when
// ignored by git. This is useful for files that are not tracked by git,
// but are still important to your project. Note that globs that are
// overly broad can slow down Zed's file scanning. Overridden by `file_scan_exclusions`.
// Files or globs of files that will be included by Zed, even when ignored by git. This is useful
// for files that are not tracked by git, but are still important to your project. Note that globs
// that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes
// precedence over these inclusions.
"file_scan_inclusions": [".env*"],
// Git gutter behavior configuration.
"git": {
Expand Down
12 changes: 11 additions & 1 deletion docs/src/configuring-zed.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ The result is still `)))` and not `))))))`, which is what it would be by default
## File Scan Exclusions

- Setting: `file_scan_exclusions`
- Description: Configure how Add filename or directory globs that will be excluded by Zed entirely. They will be skipped during file scans, file searches and hidden from project file tree.
- Description: Files or globs of files that will be excluded by Zed entirely. They will be skipped during file scans, file searches, and not be displayed in the project file tree. Overrides `file_scan_inclusions`.
- Default:

```json
Expand All @@ -1164,6 +1164,16 @@ The result is still `)))` and not `))))))`, which is what it would be by default

Note, specifying `file_scan_exclusions` in settings.json will override the defaults (shown above). If you are looking to exclude additional items you will need to include all the default values in your settings.

## File Scan Inclusions

- Setting: `file_scan_inclusions`
- Description: Files or globs of files that will be included by Zed, even when ignored by git. This is useful for files that are not tracked by git, but are still important to your project. Note that globs that are overly broad can slow down Zed's file scanning. `file_scan_exclusions` takes precedence over these inclusions.
- Default:

```json
"file_scan_inclusions": [".env*"],
```

## File Types

- Setting: `file_types`
Expand Down

0 comments on commit 888dc0b

Please sign in to comment.