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: assign separate highlight to buffer-local keymaps #905

Open
1 task done
chrisgrieser opened this issue Dec 6, 2024 · 2 comments
Open
1 task done

feature: assign separate highlight to buffer-local keymaps #905

chrisgrieser opened this issue Dec 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@chrisgrieser
Copy link

chrisgrieser commented Dec 6, 2024

Did you check the docs?

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

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

While groups and keymaps are easily distinguishable by the icon for groups and simply having different highlight groups, buffer-local and global keymaps do get the same highlight group WhichKeyDesc, and are thus not distinguishable.

Showcase

(here, the first one is buffer local to markdown files)

Describe the solution you'd like

Assign a separate highlight group to buffer local keymaps.

(I'd even argue that distinguishing buffer-local and global keymaps is valuable enough, that they should by default have different colors, but that's probably a different question.)

Describe alternatives you've considered

The only two mechanisms for differentiating buffer-local keymaps from global ones are the sorting and require("which-key").show({ global = false }). While they technically work, they are rather inconvenient methods for checking if a mapping is buffer-local.

Additional context

No response

@chrisgrieser chrisgrieser added the enhancement New feature or request label Dec 6, 2024
Copy link
Contributor

github-actions bot commented Jan 9, 2025

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 Jan 9, 2025
@chrisgrieser
Copy link
Author

Comment for the bot

@github-actions github-actions bot removed the stale label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant