Respect project-specific settings for copilot
This commit is contained in:
parent
eeba72d775
commit
a2ab7c9eb9
6 changed files with 56 additions and 40 deletions
|
@ -26,8 +26,14 @@ pub fn language_settings<'a>(
|
|||
.language(language)
|
||||
}
|
||||
|
||||
pub fn all_language_settings<'a>(cx: &'a AppContext) -> &'a AllLanguageSettings {
|
||||
settings::get::<AllLanguageSettings>(cx)
|
||||
pub fn all_language_settings<'a>(
|
||||
file: Option<&dyn File>,
|
||||
cx: &'a AppContext,
|
||||
) -> &'a AllLanguageSettings {
|
||||
settings::get_local::<AllLanguageSettings>(
|
||||
file.map(|f| (f.worktree_id(), f.path().as_ref())),
|
||||
cx,
|
||||
)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue