idea-which-key icon indicating copy to clipboard operation
idea-which-key copied to clipboard

Feature request: Add the ability to go full width and dock to the editor

Open mattrcullum opened this issue 11 months ago • 7 comments

The emacs/vim which key plugins both take up the full width of the screen and are docked in the editor whereas idea-which-key seems to always have right margin and is not docked within the editor.

Would there be any interest in a PR that adds the ability to make idea-which-key behave more similarly to the emacs/vim variants?

For reference, here's the way emacs behaves CleanShot 2024-03-19 at 15 07 38@2x

And here's idea which key CleanShot 2024-03-19 at 15 10 03@2x

I know it's a relatively small thing but aestethics really matter to me and I would be happy to do the work if there's interest.

mattrcullum avatar Mar 19 '24 20:03 mattrcullum

With some basic modifications in PopupConfig.kt I was able to make the baloon popup take the full width of the frame. If this is something the community is interested in I'd be happy to expand on it based on everyone's feedback.

CleanShot 2024-03-19 at 17 09 22@2x

mattrcullum avatar Mar 19 '24 22:03 mattrcullum

That looks really good :+1: I believe the only reason I did not go for the full width initially, was that I could not find a way to do it :sweat_smile: I would be interested in a PR for your changes. I personally don't see any reason to not make this the default look.

TheBlob42 avatar Mar 20 '24 06:03 TheBlob42

This seems a nice change :)

Inmoresentum avatar Mar 20 '24 07:03 Inmoresentum

I would actually like something opposite :)

I am on ultrawide monitor and popup does not show up over the correct tab: image

as you can see, I was in the file on the right, and seeing the popup all the way on the left is not that heplfull also, I don't have that many commands in my config, so I don't really need the plugin :)

personally, I think show up centered at least, and with less space between commands if there are few.

Is there a way I could increase the font size in the popup?

qrzychu avatar Mar 20 '24 23:03 qrzychu

Maybe we can make this configurable to some extend :thinking:

Is there a way I could increase the font size in the popup?

You can adjust the font size as well as some other appearance related parameters. See the README here

TheBlob42 avatar Mar 21 '24 06:03 TheBlob42

Sorry for the delay in responding to this, I've been very busy with work. On that note - I've been using my fork of this for the past 2 weeks with 0 issues.

@qrzychu I took a look at the layout options provided by which-key.nvim. Here's what they offer:

layout = {
    height = { min = 4, max = 25 }, -- min and max height of the columns
    width = { min = 20, max = 50 }, -- min and max width of the columns
    spacing = 3, -- spacing between columns
    align = "left", -- align columns left, center or right
  }

Would you be happy with having the same set of options? That would give you the ability to center the content of the popup.

@TheBlob42 What are your thoughts on this?

mattrcullum avatar Apr 01 '24 19:04 mattrcullum

Sounds good to me :slightly_smiling_face: if it is easy to implement go for it.

From my memory it should now be possible to use "dictionaries" in the .ideavimrc to set such configuration in a map style instead of using the current "one variable per setting"-approach of the plugin, but you don't have to find out how this works. That is still something we can refactor later.

Would love to see a PR so I can easily compare how you implemented your changes.

TheBlob42 avatar Apr 03 '24 05:04 TheBlob42