Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: remove + character in description #834

Closed
1 task done
onexbash opened this issue Aug 28, 2024 · 4 comments
Closed
1 task done

feature: remove + character in description #834

onexbash opened this issue Aug 28, 2024 · 4 comments
Labels
enhancement New feature or request stale

Comments

@onexbash
Copy link

Did you check the docs?

  • I have read all the which-key.nvim docs

Is your feature request related to a problem? Please describe.

I want to customize the icons & names of my keymap groups, which works perfectly by using wk.add({"lhs", group, icon}) but I cant figure out how to get rid of the + character that is automatically added if the keymap is a group.
See screenshot:
CleanShot 2024-08-28 at 12 09 12

Describe the solution you'd like

An additional prop that can be passed to wk.add() to disable the auto-adding of this character.

Describe alternatives you've considered

tried to modify the desc = {} rules but it didnt work.

Additional context

CleanShot 2024-08-28 at 12 14 18

@onexbash onexbash added the enhancement New feature or request label Aug 28, 2024
@will-rigney
Copy link

You can customise the prepended character using the opts.icons.group parameter, setting it to "" if you like, as documented in https://github.com/folke/which-key.nvim/blob/bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0/lua/which-key/config.lua

Just found the option myself and thought it might help your use case, please disregard if not. Having the option to inconsistently style individual groups might be helpful to someone in any case.

@chris4prez
Copy link

I think the plus key is relevant and how the wk.add group should act/present similar to the defaults view for keymaps. (I came here to open an enhancement/bug on that)

Where I believe there is a challenge is we are missing the number of relevant keymaps in the group, as well as a space between +X and groupname.

i.e. if you look at your screenshot for s or t it shows +5 keymaps. When defining a groupname I think it should present as "icon +X Groupname" where +X denotes how many mappings exist under the key similar to the default manner. Having it present as +groupname is not consistent with how defaults are defined.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 23, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants