summaryrefslogtreecommitdiff
path: root/lisp/web.el
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-09-13 08:26:14 -0400
committermattkae <mattkae@protonmail.com>2022-09-13 08:26:14 -0400
commit6153ff67815ec44cd6409b1e1257ead59476bb7d (patch)
tree3d6ad77c43051106b3213be013efef9ce3a8663a /lisp/web.el
parentba3e1638f5cf2fdd58273fe844afcd4a55cf54ca (diff)
Some markdown, general, and typescrip tthings
Diffstat (limited to 'lisp/web.el')
-rw-r--r--lisp/web.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/web.el b/lisp/web.el
index cf78b7e..8a21a76 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -54,6 +54,26 @@
)
(add-hook 'js2-mode-hook 'keybind-setup)
+
+;; Typescript
+(defun setup-ts-mode()
+ (interactive)
+ (company-mode t)
+ (company-quickhelp-mode t)
+)
+
+(use-package typescript-mode
+ :init
+ (define-derived-mode typescript-tsx-mode typescript-mode "TSX")
+ (add-to-list 'auto-mode-alist `(,(rx ".tsx" eos) . typescript-tsx-mode))
+ :config
+ :custom
+ (typescript-indent-level 2))
+
+
+(add-hook 'typescript-mode-hook #'setup-ts-mode)
+(add-hook 'typescript-mode-hook 'eglot-ensure)
+
;; Web goodies
(autoload 'json-mode "json-mode"
"Use the json-mode package to provide 'json-mode on-demand."