summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-04-07 14:05:55 +0100
committertslil <tslil@posteo.de>2026-04-07 14:06:00 +0100
commitfaf976ddabaf0e12db2cfa05724778abc05e2397 (patch)
tree714ea5f5210cdb7ab9618c6832e70471c49ffb60 /emacs
parent2ad76fb3a6d1c8f8d932834e9d57c18a5d5ec0b1 (diff)
[emacs] setup typescript + ts + elgot
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)