all repos — nixfiles @ beffc6b2d085fa5945670c2909dfee852d7a7bb1

System and user configuration, managed by nix and home-manager

Emacs: use prettier with js files
Alan Pearce alan@alanpearce.eu
Fri, 08 Nov 2019 14:12:34 +0100
commit

beffc6b2d085fa5945670c2909dfee852d7a7bb1

parent

96002fa4d62b03023e6ff02d0a1c1f3e4a8d88f7

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

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -778,7 +778,7 @@ ;;;; Reformat on save 
 (use-package prettier-js
   :custom ((prettier-js-show-errors 'echo))
-  :ghook ('(typescript-mode-hook) #'prettier-js-mode t)
+  :ghook ('(javascript-mode-hook typescript-mode-hook) #'prettier-js-mode t)
   :config (progn
             (if-let ((prettier_d (executable-find "prettier_d")))
                 (setq prettier-js-command prettier_d