octo.nvim
octo.nvim copied to clipboard
Add whichkey support for mappings
Issue Description
Type: feature request
Describe what happened (or what feature you want)
Add whichkey support for mappings so that they are easier to discover for whichkey users
This might be too much of a niche, and out of line with this plugins goals.
While not exactly which key related I do think there's an issue with remembering all the various commands and shortcuts for octo. I typically end up tabbing out to a browser and googlingocto.vim
to figure out which key/command sequence I need to comment on a PR.
Either adding :help
support, following fugitives lead and using g?
for contextual help, or adding a popup menu for actions would be invaluable.
I didnt even know what whichkey
was 😄
Looks interesting but Im not sure about implementing any changes for integrating with a specific plugin if there is not enough demand for it. @aareman could you put an example of what that integration would look like?
@JamesApple I tried to assign sane defaults with easy mnemonics such as ca
for Comment Add
, la
for Label add
, rr
for Reaction Rocket
, etc. but I think there are too many at this point and it may get confusing.
Would something like what was proposed here be of any help?
re: :help
or g?
any PRs are very welcome :)
I like that idea. Fugitive vim (and all of tpopes plugins) do the documentation thing really well.
could you put an example of what that integration would look like
Not OP but a simple
local ok, whichkey = pcall(require, 'which-key')
if ok then
whichkey.register({ ... })
end
Should suffice (docs)
For now, I have documented all mappings. Which-key should pick these descriptions and show then in the overlay menu. The remaining part would be to group the mappings if they have the same prefix.

For now, I have documented all mappings. Which-key should pick these descriptions and show then in the overlay menu. The remaining part would be to group the mappings if they have the same prefix.
![]()
Did you merge it into the master? I dont see the docs in my nvim (using octo from latest in master)
Anyway, we have "Octo actions" to display all available actions, but I didnt satisfy, because it lacks of many operations that we need (especially when working with issues, PRs and so on) such add add comment, assign people ...
So I created a Telescope picker to select and launch all the operations available when editing issues/PRs ... and so on (actually all functions exported from octo.config )
https://github.com/tuanbass/doom-nvim/blob/tuanbass/lua/user/modules/features/github/picker.lua