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: Add option to exclude + register contents from register display. #598

Closed
1 task done
ljtpetersen opened this issue May 4, 2024 · 5 comments
Closed
1 task done
Labels
enhancement New feature or request

Comments

@ljtpetersen
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.

On Wayland, Neovim uses wl-copy and wl-paste. wl-paste hangs if the clipboard is empty. This isn't normally an issue, as I don't try to paste when there isn't anything in the clipboard. However, WhichKey will automatically show the contents of the clipboard when using or ". This causes Neovim to hang until something has been copied into the clipboard.

Describe the solution you'd like

An option to exclude the + register when displaying registers using or ". Perhaps, only exclude the contents of the + register.

Describe alternatives you've considered

Instead of creating an option specifically for the + register, a more general setting allowing one to exclude any registers could be more useful.

Additional context

I should be able to implement this myself, but I am not sure where in the configuration the option should go.

@ljtpetersen ljtpetersen added the enhancement New feature or request label May 4, 2024
@eyalk11
Copy link

eyalk11 commented May 9, 2024

Add a feature to set displays registers. I had to do commit to set it right!

@nikfp
Copy link
Contributor

nikfp commented Jun 3, 2024

@ljtpetersen

I should be able to implement this myself, but I am not sure where in the configuration the option should go.

I worked through the sections of code that this would apply to for another PR, I can get this going if you want? Or if you'd rather do it I can point you to where to go. Let me know, I think there is value in this myself and I think (hope) @folke will agree.

@ljtpetersen
Copy link
Author

@ljtpetersen

I should be able to implement this myself, but I am not sure where in the configuration the option should go.

I worked through the sections of code that this would apply to for another PR, I can get this going if you want? Or if you'd rather do it I can point you to where to go. Let me know, I think there is value in this myself and I think (hope) @folke will agree.

I've been pretty busy recently, so the first option works best for me. Thanks!

@nikfp
Copy link
Contributor

nikfp commented Jun 3, 2024

Cool. I'll hack on this the next couple days when I have a few.

@folke
Copy link
Owner

folke commented Jun 3, 2024

No option needed. Just change the below to what you want.

require("which-key.plugins.registers").registers = '*+"-:.%/#=_abcdefghijklmnopqrstuvwxyz0123456789'

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 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
Projects
None yet
Development

No branches or pull requests

4 participants