summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2019-07-26 17:04:08 +0200
committerAlan Pearce2019-07-26 17:04:08 +0200
commit24cd05bbcd17c99b9db2cba36d8ea507f5d740d5 (patch)
treece6e4fa4fa360f99b7b3396e4d5113eb615239f5
parentfa106e5ce27244ab0e9446f75fa8881b8ac31287 (diff)
downloadnixfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.tar.lz
nixfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.tar.zst
nixfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.zip
Emacs: use prettier_d if available
-rw-r--r--emacs/.emacs.d/main.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index d0e5b8d2..1121f180 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -595,7 +595,11 @@ With two prefix arguments, write out the day and month name."
 ;;;; Reformat on save
 
 (use-package prettier-js
-  :ghook ('(typescript-mode-hook) #'prettier-js-mode t))
+  :ghook ('(typescript-mode-hook) #'prettier-js-mode t)
+  :config (progn
+            (if-let ((prettier_d (executable-find "prettier_d")))
+                (setq prettier-js-command prettier_d)
+              (message "prettier_d is not available"))))
 
 ;;; Take me to my leader