diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-27T10·59+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-27T10·59+0000 |
commit | f2ba5aca310ebc7c832e3ec5a41bc70a148d5ed6 (patch) | |
tree | 493d29d7b358aa4f67789743776fa9b3e3816d0e | |
parent | 0281eb58aa1cdd98c0dc499b6910738429f9250e (diff) |
Ensure Emacs prettier hook activates
Problem: prettier-js waits for rjsx-mode. rjsx-mode only runs on .js files. As such, the hook that installs prettier-js-mode for *all* of my frontend hooks, which includes more than just js files, does not install until a javascript file is opened. Solution: Do not conditionally load prettier-js. Bonus: Remove the .js mode from rjsx.
-rw-r--r-- | emacs/.emacs.d/wpc/wpc-javascript.el | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-javascript.el b/emacs/.emacs.d/wpc/wpc-javascript.el index 3de9fff3aaa5..279b374e37ea 100644 --- a/emacs/.emacs.d/wpc/wpc-javascript.el +++ b/emacs/.emacs.d/wpc/wpc-javascript.el @@ -44,7 +44,6 @@ ;; JSX highlighting (use-package rjsx-mode - :mode "\\.js\\'" :config (general-unbind rjsx-mode-map "<" ">" "C-d") (general-nmap @@ -75,7 +74,6 @@ ;; JS autoformatting (use-package prettier-js - :after (rjsx-mode) :config (general-add-hook wpc/frontend-hooks #'prettier-js-mode)) |