summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/inits/20-programming.el20
1 files changed, 17 insertions, 3 deletions
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el
index 21c2f7b..2aa518f 100644
--- a/emacs/inits/20-programming.el
+++ b/emacs/inits/20-programming.el
@@ -1,4 +1,4 @@
-;; Time-stamp: <2026-04-03 19h58 BST (5733a89e)>
+;; Time-stamp: <2026-04-07 14h05 BST (anker)>
;; -----------------------------------------------------------------------------
;; General setup
@@ -26,13 +26,16 @@
(add-to-list 'eglot-server-programs
'(bqn-mode . ("bqnlsp")))
(add-to-list 'eglot-server-programs
- '(python-ts-mode . ("basedpyright-langserver" "--stdio"))))
+ '(python-ts-mode . ("basedpyright-langserver" "--stdio")))
+ (add-to-list 'eglot-server-programs
+ '((typescript-ts-mode tsx-ts-mode) . ("typescript-language-server" "--stdio")))
+ )
(use-package treesit-auto
:custom
(treesit-auto-install 'prompt)
:config
- (setq treesit-auto-langs '(python))
+ (setq treesit-auto-langs '(python typescript tsx))
(global-treesit-auto-mode))
(use-package centered-window
@@ -281,6 +284,17 @@
:bind (:map json-mode-map
("C-c C-f" . nil)))
+(use-package typescript-mode
+ :ensure
+ :defer
+ :hook ((typescript-ts-mode . (lambda ()
+ (eglot-ensure)
+ (programming-setup)))
+ (tsx-ts-mode . (lambda ()
+ (eglot-ensure)
+ (programming-setup))))
+ )
+
(use-package lua-mode
:ensure
:defer)