zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.72k stars 3.14k forks source link

assistant panel interacts weirdly with vim modes. #19381

Open kurtbuilds opened 1 month ago

kurtbuilds commented 1 month ago

Check for existing issues

Describe the feature

There are a few bugs I currently see when using vim mode and using the Assistant panel.

  1. While in insert mode in Editor panel, use a hotkey to open the assistant panel. For me, focus appears to get "lost", and I have to click into the panel to start typing.
  2. While in normal mode, a hotkey does correctly open and focus the assistant panel. However, it opens the panel in normal mode. I would expect the panel to be opened in insert mode. (As one data point that this is the correct/expected behavior, the inline assistant has been designed this way, where, regardless of editor mode (normal or insert), the inline assistant will be in insert mode when opened.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

ConradIrwin commented 3 weeks ago

I cannot reproduce 1 by being in a buffer then typing i cmd-?. t seems to land in normal mode correctly? Are you doing something different?

  1. Is an interesting idea. The inline assistant doesn't support vim mode at all; so this would be a bit different in that it would be lvim-enabled buffer that defaults to insert mode; which seems a bit odd. (That said, I think it's common to just use that buffer as a chat, so it may be fine...)