diff options
author | Alan Pearce | 2019-07-26 17:04:08 +0200 |
---|---|---|
committer | Alan Pearce | 2019-07-26 17:04:08 +0200 |
commit | 24cd05bbcd17c99b9db2cba36d8ea507f5d740d5 (patch) | |
tree | ce6e4fa4fa360f99b7b3396e4d5113eb615239f5 /emacs | |
parent | fa106e5ce27244ab0e9446f75fa8881b8ac31287 (diff) | |
download | dotfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.tar.lz dotfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.tar.zst dotfiles-24cd05bbcd17c99b9db2cba36d8ea507f5d740d5.zip |
Emacs: use prettier_d if available
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/main.el | 6 |
1 files changed, 5 insertions, 1 deletions
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 |