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.
This commit is contained in:
parent
0281eb58aa
commit
f2ba5aca31
1 changed files with 0 additions and 2 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue