summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-06-26 17:07:20 +0200
committerAlan Pearce2018-06-26 17:07:20 +0200
commitc17210b3d0a74a076e16354d85587a29fcaacc9b (patch)
treef82fbda4bba054b24fac7245ca2fef5ca50dc450
parentedf324f7ce1940ef7f5ecd94ecb49f5d973ec65c (diff)
downloadnixfiles-c17210b3d0a74a076e16354d85587a29fcaacc9b.tar.lz
nixfiles-c17210b3d0a74a076e16354d85587a29fcaacc9b.tar.zst
nixfiles-c17210b3d0a74a076e16354d85587a29fcaacc9b.zip
Emacs: setup typescript
-rw-r--r--emacs/.emacs.d/main.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 18b37c21..c05aac8b 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -1963,6 +1963,12 @@ With two prefix arguments, write out the day and month name."
                   js2-strict-missing-semi-warning nil
                   js2-strict-inconsistent-return-warning nil)))
 
+;;;;;;; typescript-mode
+
+(use-package typescript-mode
+  :config (progn
+            (setq typescript-indent-level 2)))
+
 ;;;;;;; rjsx-mode
 
 ;; A set of advice for js2-jsx-mode to work better with React.
@@ -2047,6 +2053,14 @@ With two prefix arguments, write out the day and month name."
             (remove-hook 'js2-mode-hook #'lsp-javascript-typescript-enable)
             (add-hook 'typescript-mode-hook #'lsp-javascript-typescript-enable)))
 
+;;;;;; tide
+
+;; Let's write some typescript
+
+(use-package tide
+  :after (typescript-mode company flycheck)
+  :hook ((typescript-mode . tide-setup)))
+
 ;;;;;; tern
 
 ;; Tern understands javascript.  It adds really clever documented