nvim-code-action-menu icon indicating copy to clipboard operation
nvim-code-action-menu copied to clipboard

Windows width changes when navigating code action menu

Open jcowgar opened this issue 2 years ago • 5 comments

The windows change in width and many times word wrap when moving from option to option in the menu. I introduced an error in my NeoVim config to show this problem. I've attached two screen shots.

It seems to take the width of the diff window.

To replicate, add unpack() with no parameters in your NeoVim .lua config somewhere and call CodeActionMenu with your cursor on unpack(). one two

jcowgar avatar May 02 '22 18:05 jcowgar

To add to this issue, this seriously hurts usability. Since the width changes while navigating the menu by pressing up and down, options with long text occasionally wraps and unwraps, causing all the options below to jump up and down. The width of the popup should be kept no smaller than the longest line among the options.

kotatsuyaki avatar Jul 29 '22 13:07 kotatsuyaki

does anybody have solution for this? I'm really bad with lua

MangoIV avatar May 29 '23 16:05 MangoIV

Recently started using this in combination with coc-code-action-menu and I'm sad there doesn't seem to be a fix yet. From what I gather, the overall width of the menu depends on the width of the code window, but sometimes there's no code window at all. The width should be determined based on the longest action's text. image image image This is quite unpractical.

SirWrexes avatar Jun 19 '23 18:06 SirWrexes

I believe I fixed it in https://github.com/weilbith/nvim-code-action-menu/pull/69

Now it's just a matter of keeping our fingers crossed that @weilbith is still around and maintains this repository 😅

Gelio avatar Nov 28 '23 10:11 Gelio

Sorry, I struggle a lot with this plugin. It is in a prototype state and any rewrite I did has been discarded by myself. Was unlucky to share this on Reddit. I feel really sorry about this. Thinking about archiving it.

Anyhow, in regards of this ticket, could anybody try out the PR and confirm that it solves the problem for him? Then I'm happy to just merge it.

weilbith avatar Nov 29 '23 14:11 weilbith