edit prediction: Improve UX around disabled_globs and show_inline_completions (#24207)
Release Notes: - N/A --------- Co-authored-by: Danilo <danilo@zed.dev> Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
co-authored by
Danilo
Danilo Leal
parent
37db1dcd48
commit
e1a6d9a485
@@ -886,18 +886,7 @@ impl AllLanguageSettings {
|
||||
}
|
||||
|
||||
/// Returns whether edit predictions are enabled for the given language and path.
|
||||
pub fn inline_completions_enabled(
|
||||
&self,
|
||||
language: Option<&Arc<Language>>,
|
||||
path: Option<&Path>,
|
||||
cx: &App,
|
||||
) -> bool {
|
||||
if let Some(path) = path {
|
||||
if !self.inline_completions_enabled_for_path(path) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn show_inline_completions(&self, language: Option<&Arc<Language>>, cx: &App) -> bool {
|
||||
self.language(None, language.map(|l| l.name()).as_ref(), cx)
|
||||
.show_inline_completions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user