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

Integration with nvim-mapper #2

Open
bmulholland opened this issue Aug 16, 2021 · 3 comments
Open

Integration with nvim-mapper #2

bmulholland opened this issue Aug 16, 2021 · 3 comments
Labels
integration Integration with another plugin

Comments

@bmulholland
Copy link

nvim-mapper provides a way to find and remember key mappings, but it requires re-writing your mappings in its special format. The special format provides no benefits except for informing the plugin about the available maps. On the other hand, nest.nvim provides a nice way of formatting mappings in ways that group similar keybindings together, a clear benefit that makes sense to adopt. An integration with nvim-mapper would make it much easier to get the benefits of both plugins with minimal changes to the nest.nvim format.

@LionC
Copy link
Owner

LionC commented Aug 16, 2021

I actually thought about the same thing, but with which-key, which also has a more complicated custom format to define mappings but is really good at showing mappings.

I will put it on the list for integrations - there might be several interesting optional integrations :-)

@LionC LionC added core-feature New self contained feature integration Integration with another plugin and removed core-feature New self contained feature labels Aug 16, 2021
@LionC LionC changed the title Feature Suggestion: Integration with nvim-mapper Integration with nvim-mapper Aug 16, 2021
@LionC LionC added this to the v1.2 milestone Aug 16, 2021
@bmulholland
Copy link
Author

Thanks for mentioning it! Actually I already use folke/which-key.nvim and thought it didn't work for non-leader keybindings. Now I see it does, so (I think?) I don't need to use nvim-mapper for those features.

I also see the which-key mapping format looks very similar to nest.vim - if you do add a which-key integration, it would be helpful to have some examples of why use nest.nvim's format :)

@LionC
Copy link
Owner

LionC commented Aug 16, 2021

I also see the which-key mapping format looks very similar to nest.vim - if you do add a which-key integration, it would be helpful to have some examples of why use nest.nvim's format :)

which-keys format actually tries to understand the keys, which means that grouping e.g. <C- does not work. As far as I know they also do not offer cascading options, just defaults, but I might be wrong about that. I tried to use it before to do what I did here and gave up at some point.

nest just concatenates strings for prefixes without any magic. That means that without parsing the binding myself, I do not really know the key sequence key-by-key (which which-key needs for the actual core feature of the plugin), but I also don't need to, because people can already read Vim mapping syntax.

@LionC LionC removed this from the v1.2 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Integration with another plugin
Projects
None yet
Development

No branches or pull requests

2 participants