diff options
Diffstat (limited to 'lisp/web.el')
-rw-r--r-- | lisp/web.el | 20 |
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." |