Show inline completions in menu only for supported providers (#22181)
This changes #22093 by making the change only have an effect for the supported provider: Zeta. Made the change because the UX is still experimental and I don't want to break existing workflows for Copilot/Supermaven users. Even Zeta users can opt-out of it by setting `"show_inline_completions_in_menu": false` in their settings, in case they want the old show-inline-completion-or-show-lsp-completion behavior back. Release Notes: - N/A
This commit is contained in:
@@ -20,6 +20,7 @@ pub struct InlineCompletion {
|
||||
pub trait InlineCompletionProvider: 'static + Sized {
|
||||
fn name() -> &'static str;
|
||||
fn display_name() -> &'static str;
|
||||
fn show_completions_in_menu() -> bool;
|
||||
fn is_enabled(
|
||||
&self,
|
||||
buffer: &Model<Buffer>,
|
||||
@@ -59,6 +60,7 @@ pub trait InlineCompletionProviderHandle {
|
||||
cursor_position: language::Anchor,
|
||||
cx: &AppContext,
|
||||
) -> bool;
|
||||
fn show_completions_in_menu(&self) -> bool;
|
||||
fn refresh(
|
||||
&self,
|
||||
buffer: Model<Buffer>,
|
||||
@@ -95,6 +97,10 @@ where
|
||||
T::display_name()
|
||||
}
|
||||
|
||||
fn show_completions_in_menu(&self) -> bool {
|
||||
T::show_completions_in_menu()
|
||||
}
|
||||
|
||||
fn is_enabled(
|
||||
&self,
|
||||
buffer: &Model<Buffer>,
|
||||
|
||||
Reference in New Issue
Block a user