hkupty/impromptu.nvim

Customizable quit key

resolritter opened this issue · 4 comments

It seems like q is hardcoded as a quit shortcut.

https://github.com/Vigemus/impromptu.nvim/blob/d8e1d078cd9adc7a27c618ca3fa13c0bb476525e/lua/impromptu/internals/ask.lua#L157

I usually quit out of things with <esc> or <c-c> so would like to customize this.

The other forms are closed with <C-c>, so I think it makes sense to change this one as well.

@hkupty I originally tried to solve this and #42 by myself, but found no way to detect when the impromptu buffer opens. I've seen other libraries allow interaction upon opening either through:

  • Setting a custom filetype
  • Issuing a User autocmd

As I understood you plan to change the default, right? I think it would make more sense for flexibility if one the interactions I listed above could be done. Just to be clear, what I wanted was a custom option which would allow me to customize the key, not directly change the defaults.

I wanted to make the three forms behave somewhat the same way. That is converging with what you described.

I also want to make configuration more flexible and there's a way to do that through lua which can be mapped to viml as well, and I've started that already.

I'm sorry that it's not ready yet, but several things got in the way.

I'll probably be able to focus on that on the coming weeks.

Does that work for you?

@hkupty I can't picture what it is, but any attempt is very appreciated. I'll be there to update the plugin and give feedback as soon as I can when you make the changes. Thank you for your work!