Show inline completions inside the completion menu if both are available (#22093)

Screenshot:

![screenshot-2024-12-17-11 53
41@2x](https://github.com/user-attachments/assets/bace3d20-7175-4833-9326-7b859166c0e8)

Demo:


https://github.com/user-attachments/assets/70197042-4785-4e45-80fd-29d12e68333f



(Note for Joseph/Peter: this supersedes
https://github.com/zed-industries/zed/pull/22069)

Release Notes:
- Changed inline completions to show up inside the normal completions in
case LSP and inline-completions are available. In that case, the inline
completion will be the first entry in the menu and can be selected with
`<tab>`.

---------

Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
Thorsten Ball 2024-12-17 13:34:25 +01:00 committed by GitHub
parent cc56ed7a88
commit 95334cb0ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 661 additions and 429 deletions

View file

@ -98,6 +98,10 @@ impl InlineCompletionProvider for SupermavenCompletionProvider {
"supermaven"
}
fn display_name() -> &'static str {
"Supermaven"
}
fn is_enabled(&self, buffer: &Model<Buffer>, cursor_position: Anchor, cx: &AppContext) -> bool {
if !self.supermaven.read(cx).is_enabled() {
return false;