Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

completions: Restore tab behavior when both visible (#22069)

Thorsten Balld135ec2b73b6
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json
index f93c459ec69..5c300e82883 100644
--- a/assets/keymaps/default-linux.json
+++ b/assets/keymaps/default-linux.json
@@ -468,21 +468,24 @@
}
},
{
- "context": "Editor && showing_completions",
+ "context": "Editor && !inline_completion && showing_completions",
"use_key_equivalents": true,
"bindings": {
- "enter": "editor::ConfirmCompletion"
+ "enter": "editor::ConfirmCompletion",
+ "tab": "editor::ComposeCompletion"
}
},
{
- "context": "Editor && !inline_completion && showing_completions",
+ "context": "Editor && inline_completion && showing_completions",
"use_key_equivalents": true,
"bindings": {
- "tab": "editor::ComposeCompletion"
+ "enter": "editor::ConfirmCompletion",
+ "tab": "editor::ComposeCompletion",
+ "shift-tab": "editor::AcceptInlineCompletion"
}
},
{
- "context": "Editor && inline_completion",
+ "context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::AcceptInlineCompletion"
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index f821bc982d3..a3f35dccdd4 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -539,21 +539,24 @@
}
},
{
- "context": "Editor && showing_completions",
+ "context": "Editor && !inline_completion && showing_completions",
"use_key_equivalents": true,
"bindings": {
- "enter": "editor::ConfirmCompletion"
+ "enter": "editor::ConfirmCompletion",
+ "tab": "editor::ComposeCompletion"
}
},
{
- "context": "Editor && !inline_completion && showing_completions",
+ "context": "Editor && inline_completion && showing_completions",
"use_key_equivalents": true,
"bindings": {
- "tab": "editor::ComposeCompletion"
+ "enter": "editor::ConfirmCompletion",
+ "tab": "editor::ComposeCompletion",
+ "shift-tab": "editor::AcceptInlineCompletion"
}
},
{
- "context": "Editor && inline_completion",
+ "context": "Editor && inline_completion && !showing_completions",
"use_key_equivalents": true,
"bindings": {
"tab": "editor::AcceptInlineCompletion"