which-key.nvim icon indicating copy to clipboard operation
which-key.nvim copied to clipboard

bug: incorrect spacing between backspace icon and word

Open me-tiny opened this issue 2 years ago • 6 comments

Did you check docs and existing issues?

  • [X] I have read all the which-key.nvim docs
  • [X] I have updated the plugin to the latest version before submitting this issue
  • [X] I have searched the existing issues of which-key.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.0

Operating system/version

MacOS 14.5

Describe the bug

CleanShot 2024-07-16 at 22 42 59@2x The spacing between the <- icon and 'back' is off and it overlaps it.

Steps To Reproduce

  1. Start Neovim
  2. Trigger which-key to open

Expected Behavior

CleanShot 2024-07-16 at 22 50 43@2x

Can be solved with

opts = {
    icons = {
        keys = {
            BS = '󰭜 ', -- Add space after icon
        }
    }
}

Health

No response

Log

No response

Repro

No response

me-tiny avatar Jul 16 '24 12:07 me-tiny

I'd say that just your font settings or terminal Which-key can really likely do nothing about that

max397574 avatar Jul 16 '24 12:07 max397574

This is of course font-related, but the default icon is also a bit strange imo - it's using the Unicode U+232B "Erase to the Left" character, whereas all the other key icons are using some kind of nerd font icon. @folke The icon suggested above is actually the nf-md-backspace_outline icon, which solves this issue and fits better with the other icons.

Also while we're on the subject on key icons, could I suggest adding "󰘳 " (nf-md-apple_keyboard_command) for <D-? It fits with the other icons, and I think having it as a default would be useful.

atoerien avatar Jul 16 '24 13:07 atoerien

Mine was actually correct, but I changed it to a nerd font symbol.

folke avatar Jul 16 '24 13:07 folke

I won't add that apple icon. Not everyone is on Mac...

folke avatar Jul 16 '24 13:07 folke

On the other hand, can't find a better icon, so added it anyway

folke avatar Jul 16 '24 13:07 folke

Yeah I would have preferred a non-mac-specific icon, but there aren't really any unless you just use the windows logo. The default Ctrl, Shift and most notably Alt icons are all apple icons too, presumably also because no nicer ones exist.

atoerien avatar Jul 16 '24 13:07 atoerien