Disable formatting on save
chrisalcantara opened this issue · 3 comments
chrisalcantara commented
I'd like to bind prettier-js
to a shortcut instead of having the minor mode run the command on save. Is this possible?
rcoedo commented
It is, just don't enable the mode at all and bind the shortcut to the prettier-js
function.
chrisalcantara commented
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.
chrisalcantara commented
Closing. I solved the issue by loading my own version of prettier-emacs and commenting out the autoload function.