prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

Doesn't have effect #45

Open ianyepan opened 5 years ago

ianyepan commented 5 years ago

I'm afraid that I'm misinterpreting this package, but after putting

(require 'prettier-js)
(setq prettier-js-args '(
  "--trailing-comma" "all"
  "--bracket-spacing" "true"
))
(add-hook 'js2-mode-hook 'prettier-js-mode)

in my .emacs file, it doesn't seem to change anything. If I run prettier --write index.js from the command line it will beautify my code, but Emacs itself doesn't seem to be doing anything...(auto-format on save, etc.)