summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/main.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 65eae69..cdd65da 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -2024,6 +2024,15 @@ With two prefix arguments, write out the day and month name."
               (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.