From 2c275841789ae9558585646cec3e18cad292f603 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 7 Sep 2018 17:10:04 +0200 Subject: Emacs: Configure prettier-js --- emacs/.emacs.d/main.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'emacs') 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. -- cgit 1.4.1