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
co-authored by Bennet Danilo
parent cc56ed7a88
commit 95334cb0ad
11 changed files with 661 additions and 429 deletions
+1 -10
View File
@@ -471,22 +471,13 @@
}
},
{
"context": "Editor && !inline_completion && showing_completions",
"context": "Editor && showing_completions",
"use_key_equivalents": true,
"bindings": {
"enter": "editor::ConfirmCompletion",
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && inline_completion && showing_completions",
"use_key_equivalents": true,
"bindings": {
"enter": "editor::ConfirmCompletion",
"tab": "editor::ComposeCompletion",
"shift-tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,