justinbarclay / parinfer-rust-mode

Simplifying how you write Lisp
https://shaunlebron.github.io/parinfer/
GNU General Public License v3.0
233 stars 16 forks source link

Change default parinfer-rust-mode-map key bindings #62

Closed dannyfreeman closed 1 year ago

dannyfreeman commented 1 year ago

The default keybindings for parinfer-rust-mode clash with some major mode bindings. One of those modes is Cider. Parinfer-rust-mode pairs very well with Cider so they are often active at the same time. The clashing key is C-c C-p bound to cider-pprint-eval-last-sexp.

According to the Emacs key binding conventions

Sequences consisting of C-c followed by a control character or a digit are reserved for major modes

which includes C-c C-p.

C-c followed by a letter are reserved for users, which leaves

Sequences consisting of C-c followed by any other ASCII punctuation or symbol character are allocated for minor modes

If parinfer-rust-mode must have some keys bound out of the box by default, then consider changing them to follow these Emacs conventions. Maybe something like C-c C-( would be fine and easy to remember. Another option is to not bind them at all, leaving the parinfer-rust-mode-map empty for users to bind to as they please.

justinbarclay commented 1 year ago

Yeah, that makes sense. I don't think I realized I was abusing the conventions when writing this. I'd be happy to take a PR that disables the bindings and adds docs pointing users on how to enable them (preferably to the current bindings).

dannyfreeman commented 1 year ago

Thank you for considering this request! Here is a PR for it: https://github.com/justinbarclay/parinfer-rust-mode/pull/63

dannyfreeman commented 1 year ago

I see that you merged my PR, so closing this.