Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
:art:
Max Brunsfeld0d281c1b8953
diff --git a/crates/language/src/language_settings.rs b/crates/language/src/language_settings.rsindex b03dd6a6b9f..332e789b4d7 100644--- a/crates/language/src/language_settings.rs+++ b/crates/language/src/language_settings.rs@@ -19,21 +19,16 @@ pub fn language_settings<'a>(file: Option<&Arc<dyn File>>,cx: &'a AppContext,) -> &'a LanguageSettings {- settings::get_local::<AllLanguageSettings>(- file.map(|f| (f.worktree_id(), f.path().as_ref())),- cx,- )- .language(language.map(|l| l.name()).as_deref())+ let language_name = language.map(|l| l.name());+ all_language_settings(file, cx).language(language_name.as_deref())}pub fn all_language_settings<'a>(file: Option<&Arc<dyn File>>,cx: &'a AppContext,) -> &'a AllLanguageSettings {- settings::get_local::<AllLanguageSettings>(- file.map(|f| (f.worktree_id(), f.path().as_ref())),- cx,- )+ let location = file.map(|f| (f.worktree_id(), f.path().as_ref()));+ settings::get_local(location, cx)}#[derive(Debug, Clone)]