Skip to content

WIP: Feat/which key descriptions #334

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

Closed

Conversation

jgollenz
Copy link
Contributor

@jgollenz jgollenz commented Jun 14, 2022

closes #314

TODO

  • multi-key rebinding
  • basic rebinding (user passes a string, not a table)
  • discuss descriptions

@jgollenz jgollenz marked this pull request as draft June 14, 2022 21:54
@jgollenz jgollenz force-pushed the feat/which-key-descriptions branch 2 times, most recently from a8267fb to 60b99af Compare June 15, 2022 16:30
@jgollenz jgollenz marked this pull request as ready for review June 15, 2022 16:42
@jgollenz
Copy link
Contributor Author

@kristijanhusak this should work. I need some confirmation on the descriptions I added

@jgollenz jgollenz marked this pull request as draft June 16, 2022 13:04
@jgollenz jgollenz force-pushed the feat/which-key-descriptions branch from 60b99af to b28f385 Compare June 16, 2022 13:45
@kristijanhusak
Copy link
Member

Descriptions look fine, I just don't know if which-key gives some context around mappings? If a mapping has description Earlier, will user see something like Orgmode - Earlier or something like that?

@jgollenz
Copy link
Contributor Author

I just don't know if which-key gives some context around mappings? If a mapping has
description Earlier, will user see something like Orgmode - Earlier or something like that?

Hm, it doesn't look like that is possible via opts.desc alone. It is possible to explicitly markup o (or whatever) with orgmode. Mappings with multiple keys for lhs, are organized in a tree structure:

which-key

If nothing is declared for o or oi it will be displayed as +prefix. So no implicit context, unless we specify it

@kristijanhusak
Copy link
Member

So no implicit context, unless we specify it

Ok, lets add it. I think it will be more useful if users know the context, especially if they override some of the <Leader>o mappings.

@kristijanhusak
Copy link
Member

These mappings are really starting to complicate. Lets hold on this for a bit, I'll rewrite it today so it's more readable and testable. I'm worried we will break something with these changes.

@jgollenz
Copy link
Contributor Author

These mappings are really starting to complicate

Absolutely. It's special cases galore. Didn't want to introduce any breaking changes, that's why I did it this way. Ideally, all the mappings have the same format. Right now there is ~5 different ways to do it

@jgollenz
Copy link
Contributor Author

And as can be seen with the help overlay, things are already starting to break

@akinsho akinsho mentioned this pull request Jun 19, 2022
@jgollenz jgollenz closed this Jun 24, 2022
@jgollenz jgollenz force-pushed the feat/which-key-descriptions branch from b28f385 to 3186ac3 Compare June 24, 2022 23:51
@jgollenz
Copy link
Contributor Author

new PR is #352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add desc to orgmode keymap
2 participants