summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2020-06-11 13:22:55 +0200
committerAlan Pearce2020-06-11 13:22:55 +0200
commit6c46c6e4a6567ecd72cffd66c3e8e7de64766aa3 (patch)
tree71b733db4ce729f4e7b0ae8d8038e095fa0ff210 /user/emacs
parentde7b61c9b7decfc2a3a79a150e2b8fe4d973f24d (diff)
downloadnixfiles-6c46c6e4a6567ecd72cffd66c3e8e7de64766aa3.tar.lz
nixfiles-6c46c6e4a6567ecd72cffd66c3e8e7de64766aa3.tar.zst
nixfiles-6c46c6e4a6567ecd72cffd66c3e8e7de64766aa3.zip
Emacs: add tide for live TS type checking
eslint doesn't check types, which leads to surprising behaviour when
building.
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 7a4cfbf8..1424b655 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -908,6 +908,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :config (setq add-node-modules-max-depth 6)
   :ghook ('(js2-mode-hook typescript-mode-hook) #'add-node-modules-path))
 
+(use-package tide
+  :after (typescript-mode company flycheck)
+  :ghook ('typescript-mode-hook #'tide-setup))
+
 ;;;; Reformat on save
 
 (use-package prettier-js