|
@ -1134,7 +1134,7 @@ maybe only typescript? |
|
|
(use-package tide |
|
|
(use-package tide |
|
|
:ensure t |
|
|
:ensure t |
|
|
:after (rjsx-mode company flycheck) |
|
|
:after (rjsx-mode company flycheck) |
|
|
:hook (rjsx-mode . setup-tide-mode) |
|
|
|
|
|
|
|
|
; :hook (rjsx-mode . setup-tide-mode) |
|
|
:config |
|
|
:config |
|
|
(defun setup-tide-mode () |
|
|
(defun setup-tide-mode () |
|
|
"Setup function for tide." |
|
|
"Setup function for tide." |
|
@ -1143,13 +1143,23 @@ maybe only typescript? |
|
|
(flycheck-mode t) |
|
|
(flycheck-mode t) |
|
|
(setq flycheck-check-synta-automatically '(save mode-enabled)) |
|
|
(setq flycheck-check-synta-automatically '(save mode-enabled)) |
|
|
(tide-hl-identifier-mode t))) |
|
|
(tide-hl-identifier-mode t))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(use-package add-node-modules-path |
|
|
|
|
|
:ensure t |
|
|
|
|
|
:defer t |
|
|
|
|
|
:hook (flycheck-mode . add-node-modules-path)) |
|
|
|
|
|
|
|
|
|
|
|
;; needs npm install -g prettier |
|
|
(use-package prettier-js |
|
|
(use-package prettier-js |
|
|
:ensure t |
|
|
:ensure t |
|
|
:after (rjsx-mode) |
|
|
:after (rjsx-mode) |
|
|
:defer t |
|
|
:defer t |
|
|
:diminish prettier-js-mode |
|
|
:diminish prettier-js-mode |
|
|
:hook (((js2-mode rsjx-mode) . prettier-js-mode))) |
|
|
|
|
|
|
|
|
:hook (((js2-mode rsjx-mode) . setup-prettier)) |
|
|
|
|
|
:config |
|
|
|
|
|
(defun setup-prettier () |
|
|
|
|
|
(add-node-modules-path) |
|
|
|
|
|
(prettier-js-mode))) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
** YAML |
|
|
** YAML |
|
|