Closed jenslys closed 1 month ago
I was about to make this exact issue, but for a bind to open the command_palette
.
"cmd-k": "command_palette::Toggle",
I think the issue stems from the many many default bindings that are chords and zed's waiting to see if there is a follow up command.
A quick sample from the default keymap.
"cmd-k cmd-s": "zed::OpenKeymap",
"cmd-k cmd-t": "theme_selector::Toggle",
"cmd-k m": "language_selector::Toggle",
"cmd-k cmd-left": ["workspace::ActivatePaneInDirection", "Left"],
"cmd-k cmd-right": ["workspace::ActivatePaneInDirection", "Right"],
"cmd-k cmd-up": ["workspace::ActivatePaneInDirection", "Up"],
"cmd-k cmd-down": ["workspace::ActivatePaneInDirection", "Down"],
"cmd-k shift-left": ["workspace::SwapPaneInDirection", "Left"],
"cmd-k shift-right": ["workspace::SwapPaneInDirection", "Right"],
"cmd-k shift-up": ["workspace::SwapPaneInDirection", "Up"],
"cmd-k shift-down": ["workspace::SwapPaneInDirection", "Down"],
I understand the need to wait, and can see this may not be easy to solve.
For myself, I'd be happy to remove all the other keybindings and have mine overwrite.
Maybe something like CSS's !important
could work?
"!important cmd-k": "command_palette::Toggle",
We could potentially make it so that if prefix is defined in the user config, but the multi-key bindings are in the default config, we make it take precedence automatically.
The main downside to that is that you can accidentally override a bunch of builtin keystrokes, but it seems better than the status quo.
The main downside to that is that you can accidentally override a bunch of builtin keystrokes, but it seems better than the status quo.
From my perspective I'm not likely to memorise all the multi-key combos, and would instead search for them as needed. So I'm totally fine with losing them all. I can imagine it may be unexpected to some though. Maybe a code hint or something in the user config to let us know it's disabling a bunch of shortcuts?
This should be included in Zed v0.146.0-pre.
Check for existing issues
Describe the bug / provide steps to reproduce it
If you add a custom bind/keymap to the inline assist, there is a noticeable 3 second delay before the prompt shows up.
Environment
Zed: v0.140.5 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Default keymap vs Custom
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.Zed.log