echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.84k stars 183 forks source link

Custom `Q` mapping does not work #619

Closed prescientmoon closed 9 months ago

prescientmoon commented 9 months ago

Contributing guidelines

Module(s)

mini.clue

Description

Custom Q keymappings get removed by mini.clue it seems

Neovim version

NVIM v0.9.4 Build type: Release LuaJIT 2.1.1693350652

Steps to reproduce

Expected behavior

The keybind should keep working (I have the default Q behaviour bound to something else, as I wasn't using it super often)

Actual behavior

The keybind does not work

prescientmoon commented 9 months ago

Hmm, I also wonder if there's a way to not close a clue window until <Esc> is pressed (this would be super useful for a lot of "submodes")

echasnovski commented 9 months ago

Thanks for the issue!

Unfortunately, having Q mapping to properly mimic its default behavior for replaying last recorded register is the only way to make it work right now. And it is documented.

I have made a PR to Neovim itself (neovim/neovim#24565) which if merged would allow to skip making those mappings.

Before this happens, my suggestion is to make custom Q mapping after calling require('mini.clue').setup().

Closing as it is (currently) an expected behavior.