pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.24k stars 124 forks source link

Commands / Mappings cleanup #547

Open prettymuchbryce opened 1 month ago

prettymuchbryce commented 1 month ago

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.

pwntester commented 3 weeks ago

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