pwntester / octo.nvim

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

Commands / Mappings cleanup #547

Open prettymuchbryce opened 5 months ago

prettymuchbryce commented 5 months 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 5 months ago

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

wd60622 commented 2 weeks ago

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