Add support for folder-specific settings (#2537)
This PR allows you to customize Zed's settings within a particular folder by creating a `.zed/settings.json` file within that folder. Todo * [x] respect folder-specific settings for local projects * [x] respect folder-specific settings in remote projects * [x] pass a path when retrieving editor/language settings * [x] pass a path when retrieving copilot settings * [ ] update the `Setting` trait to make it clear which types of settings are locally overridable Release Notes: * Added support for folder-specific settings. You can customize Zed's settings within a particular folder by creating a `.zed` directory and a `.zed/settings.json` file within that folder.
This commit is contained in:
commit
788f97ec68
27 changed files with 797 additions and 158 deletions
|
@ -1717,8 +1717,7 @@ impl LspCommand for OnTypeFormatting {
|
|||
.await?;
|
||||
|
||||
let tab_size = buffer.read_with(&cx, |buffer, cx| {
|
||||
let language_name = buffer.language().map(|language| language.name());
|
||||
language_settings(language_name.as_deref(), cx).tab_size
|
||||
language_settings(buffer.language(), buffer.file(), cx).tab_size
|
||||
});
|
||||
|
||||
Ok(Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue