Accept edit predictions with alt-tab in addition to tab (#24272)

When you have an edit prediction available, you can now also accept it
with `alt-tab` (or `alt-enter` on Linux) even if you don't have an LSP
completions menu open. This is meant to lower the mental load when going
from one mode to another.

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga 2025-02-05 11:06:12 -03:00 committed by GitHub
parent f5e8048fcb
commit c252b5db16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 14 deletions

View file

@ -502,6 +502,13 @@
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && inline_completion",
"bindings": {
// Changing the modifier currently breaks accepting while you also an LSP completions menu open
"alt-enter": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
@ -509,13 +516,6 @@
"tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && showing_completions",
"bindings": {
// Currently, changing this binding breaks the preview behavior
"alt-enter": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && showing_code_actions",
"bindings": {

View file

@ -579,6 +579,13 @@
"tab": "editor::ComposeCompletion"
}
},
{
"context": "Editor && inline_completion",
"bindings": {
// Changing the modifier currently breaks accepting while you also an LSP completions menu open
"alt-tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
@ -586,13 +593,6 @@
"tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && showing_completions",
"bindings": {
// Currently, changing this binding breaks the preview behavior
"alt-tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && showing_code_actions",
"use_key_equivalents": true,