octo.nvim icon indicating copy to clipboard operation
octo.nvim copied to clipboard

Commands / Mappings cleanup

Open prettymuchbryce opened this issue 1 year ago • 2 comments

Issue Description

Type: feature request

Describe what happened (or what feature you want)

There are some issues with the way commands / mappings are setup currently.

  1. Not every mapping is available as a command. This makes comprehensive key remapping via other means such as which-key difficult.
  2. When mappings_disable_default is true, certain features fail to work because they rely explicitly on mappings being configured, for example when submitting a review via Octo review submit here I'm confronted with the error "attempt to index field 'approve_review' (a nil value)" due to the fact that these mappings don't exist.

I think the configuration could be made more ergonomic by creating a command for every feature, and then modifying mappings such that they always invoke a command.

This gives users maximum flexibility to customize their own mappings to their liking and prevents bugs like 2 above.

prettymuchbryce avatar May 23 '24 18:05 prettymuchbryce

I like the idea, but unfortunately I dont have much time to implement it. A PR would be welcomed

pwntester avatar Jun 09 '24 17:06 pwntester

Hi @prettymuchbryce, would you like to work through some of this?

williambdean avatar Oct 17 '24 21:10 williambdean