Skip to content

Commit

Permalink
Accept edit predictions with alt-tab in addition to tab (#24272)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
agu-z authored Feb 5, 2025
1 parent f5e8048 commit c252b5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,17 +503,17 @@
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"context": "Editor && inline_completion",
"bindings": {
"tab": "editor::AcceptInlineCompletion"
// Changing the modifier currently breaks accepting while you also an LSP completions menu open
"alt-enter": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && showing_completions",
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"bindings": {
// Currently, changing this binding breaks the preview behavior
"alt-enter": "editor::AcceptInlineCompletion"
"tab": "editor::AcceptInlineCompletion"
}
},
{
Expand Down
12 changes: 6 additions & 6 deletions assets/keymaps/default-macos.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,17 +580,17 @@
}
},
{
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"context": "Editor && inline_completion",
"bindings": {
"tab": "editor::AcceptInlineCompletion"
// Changing the modifier currently breaks accepting while you also an LSP completions menu open
"alt-tab": "editor::AcceptInlineCompletion"
}
},
{
"context": "Editor && inline_completion && showing_completions",
"context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"bindings": {
// Currently, changing this binding breaks the preview behavior
"alt-tab": "editor::AcceptInlineCompletion"
"tab": "editor::AcceptInlineCompletion"
}
},
{
Expand Down

0 comments on commit c252b5d

Please sign in to comment.