From 6153ff67815ec44cd6409b1e1257ead59476bb7d Mon Sep 17 00:00:00 2001 From: mattkae Date: Tue, 13 Sep 2022 08:26:14 -0400 Subject: Some markdown, general, and typescrip tthings --- lisp/web.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lisp/web.el') 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." -- cgit v1.2.1