From 888dc0b3445cef77d898f0f31a05ebfaa2636327 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Mon, 17 Feb 2025 16:31:06 -0700 Subject: [PATCH] Document `file_scan_inclusions` and make consistent with default.json (#25046) Release Notes: - N/A --- assets/settings/default.json | 13 ++++++------- docs/src/configuring-zed.md | 12 +++++++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index a5be294a22..a3a592a59b 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -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", @@ -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": { diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index aecdb92198..0d44dbfe91 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -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 @@ -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`