Closed chrisalcantara closed 5 years ago
It is, just don't enable the mode at all and bind the shortcut to the prettier-js
function.
I tried that but get the following error:
Wrong type argument: commandp, prettier-js
.
This is what my keybinding looks like:
(eval-after-load 'js2-mode '(define-key js2-mode-map (kbd "C-c C-c") 'prettier-js))
The shortcut does work as expected if I enable then disable prettier-js-mode in the buffer. Obviously, that is not ideal.
Closing. I solved the issue by loading my own version of prettier-emacs and commenting out the autoload function.
I'd like to bind
prettier-js
to a shortcut instead of having the minor mode run the command on save. Is this possible?