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

fixbug: Add description to keymaps #8

Merged
merged 2 commits into from
Jun 8, 2022

Conversation

johmsalas
Copy link
Owner

@johmsalas johmsalas commented Jun 8, 2022

This PR adds description to the keybindings

WhichKey

image

Telescope

image

TODO:
[ ] Sort which key mappings (Should create a different issue)
[ ] Show key mappings for partial keys, like ga and gao (Should create a different issue)
[ ] Clean up after finding out vim.keymap.set('n', '<key>', lua_func, {desc = 'this is what I do'}) does almost all the job

@johmsalas johmsalas linked an issue Jun 8, 2022 that may be closed by this pull request
@johmsalas johmsalas marked this pull request as ready for review June 8, 2022 21:53
@johmsalas johmsalas merged commit 576e774 into main Jun 8, 2022
@johmsalas johmsalas deleted the issue-6_provide-key-mapping-desc branch June 8, 2022 21:54
johmsalas added a commit that referenced this pull request Jun 9, 2022
johmsalas added a commit that referenced this pull request Jun 9, 2022
@johmsalas johmsalas restored the issue-6_provide-key-mapping-desc branch June 9, 2022 02:29
}

pcall(
require("which-key").register,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johmsalas I think this is probably why you had issues, this function always requires which key even if it is inside a pcall because rather than wrapping the require you wrap the register.

This should be local ok, whichkey = pcall(require, 'which-key') then if ok is true then use register

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯 I'm realizing you are a ninja.
If I could give you a review that you'd be "empowers others"

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 description to keymaps that are set
2 participants