all repos — archive/dotfiles @ 2c275841789ae9558585646cec3e18cad292f603

Superseded by nixfiles

Emacs: Configure prettier-js
Alan Pearce alan@alanpearce.eu
Fri, 07 Sep 2018 17:10:04 +0200
commit

2c275841789ae9558585646cec3e18cad292f603

parent

e1834dda554a1f108d7a17588571191417f7d15e

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -2024,6 +2024,15 @@ (setq-local flycheck-javascript-standard-executable (executable-find "prettier-standard")))               (when (executable-find "standard")
                 (setq-local flycheck-javascript-standard-executable (executable-find "standard"))))))
 
+;;;;;;; Prettier
+
+;; Reformat files on save
+
+(use-package prettier-js
+  :config (progn
+            (add-hook 'typescript-mode #'prettier-js-mode)
+            (add-hook 'js2-mode #'prettier-js-mode)))
+
 ;;;;;;; Indium
 
 ;; Javascript with an inferior node.js process and a debugger?  Awesome.