Clarify copilot settings
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
c5e56a5e45
commit
1fd07b6fcf
5 changed files with 73 additions and 88 deletions
|
@ -2816,7 +2816,10 @@ impl Editor {
|
|||
let snapshot = self.buffer.read(cx).snapshot(cx);
|
||||
let cursor = self.selections.newest_anchor().head();
|
||||
let language_name = snapshot.language_at(cursor).map(|language| language.name());
|
||||
if !cx.global::<Settings>().copilot_on(language_name.as_deref()) {
|
||||
if !cx
|
||||
.global::<Settings>()
|
||||
.show_copilot_suggestions(language_name.as_deref())
|
||||
{
|
||||
self.hide_copilot_suggestion(cx);
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue