settings: Load .zed/settings.json
even if .gitignored (#13370)
This fixes #4432 by ensuring that we scan & watch the `.zed` folder, just like we watch the `.git`, for changes. Release Notes: - Settings are now loaded from local `.zed/settings.json` files even if they are `.gitignore`d. ([#4432](https://github.com/zed-industries/zed/issues/4432)). Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
parent
4072ad2858
commit
6b04b668ad
4 changed files with 10 additions and 0 deletions
|
@ -34,6 +34,7 @@ ignore.workspace = true
|
|||
language.workspace = true
|
||||
log.workspace = true
|
||||
parking_lot.workspace = true
|
||||
paths.workspace = true
|
||||
postage.workspace = true
|
||||
rpc.workspace = true
|
||||
schemars.workspace = true
|
||||
|
|
|
@ -31,6 +31,7 @@ use gpui::{
|
|||
};
|
||||
use ignore::IgnoreStack;
|
||||
use parking_lot::Mutex;
|
||||
use paths::local_settings_folder_relative_path;
|
||||
use postage::{
|
||||
barrier,
|
||||
prelude::{Sink as _, Stream as _},
|
||||
|
@ -2589,6 +2590,7 @@ impl BackgroundScannerState {
|
|||
fn should_scan_directory(&self, entry: &Entry) -> bool {
|
||||
(!entry.is_external && !entry.is_ignored)
|
||||
|| entry.path.file_name() == Some(*DOT_GIT)
|
||||
|| entry.path.file_name() == Some(local_settings_folder_relative_path().as_os_str())
|
||||
|| self.scanned_dirs.contains(&entry.id) // If we've ever scanned it, keep scanning
|
||||
|| self
|
||||
.paths_to_scan
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue