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
|
@ -224,6 +224,12 @@ pub fn default_prettier_dir() -> &'static PathBuf {
|
|||
DEFAULT_PRETTIER_DIR.get_or_init(|| support_dir().join("prettier"))
|
||||
}
|
||||
|
||||
/// Returns the relative path to a `.zed` folder within a project.
|
||||
pub fn local_settings_folder_relative_path() -> &'static Path {
|
||||
static LOCAL_SETTINGS_FOLDER_RELATIVE_PATH: OnceLock<&Path> = OnceLock::new();
|
||||
LOCAL_SETTINGS_FOLDER_RELATIVE_PATH.get_or_init(|| Path::new(".zed"))
|
||||
}
|
||||
|
||||
/// Returns the relative path to a `settings.json` file within a project.
|
||||
pub fn local_settings_file_relative_path() -> &'static Path {
|
||||
static LOCAL_SETTINGS_FILE_RELATIVE_PATH: OnceLock<&Path> = OnceLock::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue