From 24cd05bbcd17c99b9db2cba36d8ea507f5d740d5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 26 Jul 2019 17:04:08 +0200 Subject: Emacs: use prettier_d if available --- emacs/.emacs.d/main.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index d0e5b8d..1121f18 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 -- cgit 1.4.1