weilbith / nvim-code-action-menu

Pop-up menu for code actions to show meta-information and diff preview
MIT License
576 stars 19 forks source link

Windows width changes when navigating code action menu #52

Open jcowgar opened 2 years ago

jcowgar commented 2 years ago

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

kotatsuyaki commented 2 years ago

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.

MangoIV commented 1 year ago

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

SirWrexes commented 1 year ago

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.

Gelio commented 9 months ago

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 😅

weilbith commented 9 months ago

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.