jake-stewart / multicursor.nvim

multiple cursors in neovim
MIT License
542 stars 3 forks source link

support overlapped mappings #41

Open dmtrKovalenko opened 18 hours ago

dmtrKovalenko commented 18 hours ago

Pretty much visible on the video

https://github.com/user-attachments/assets/dd981f03-df9d-4290-b736-628255e9e3a5

might be an issue with my configuration, it is based on the example here it is:

https://github.com/dmtrKovalenko/my-nvim-config/blob/895d4c46eda51cc946cdb2958a673ad654499fd8/lua/multicursor-lazy.lua#L3-L99

would appreciate any hint

jake-stewart commented 11 hours ago

init.lua line 573 you map a key to lv:

["lv"]·=·"@assignment.lhs",

As a result, when you press l, we have to wait to see whether you meant l or are about to press v for lv. I don't like keys sharing bindings for this reason.

Remove/change the lv keymap in your config.

Thanks

jake-stewart commented 8 hours ago

sorry this is definitely a bug. after the second l, it should have figured out what the first l was for.

not sure if this can be fixed though. while pressing l, your nvim is never in a safe state, and so the keys are not applied until you press a different key.

i will investigate this more when i have time. for now, you can either be happy with the lack of feedback (looks like everything still works), or remap the key.

jake-stewart commented 27 minutes ago

can possibly wrap vim.keymap.set wouldn't work unless plugin is loaded before the mappings. rarely the case