From a7eeda6516fc6219291caba2e917544131575588 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Jan 2023 20:49:06 +0100 Subject: [PATCH] Emacs fixes for typescript & webmode --- emacs/.config/emacs/init.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el index b0fc7f7..03c78fc 100644 --- a/emacs/.config/emacs/init.el +++ b/emacs/.config/emacs/init.el @@ -46,7 +46,7 @@ '(elcord-quiet t) '(elcord-use-major-mode-as-main-icon nil) '(package-selected-packages - '(sublimity typescript-mode glsl-mode format-all hl-todo elcord evil-tabs evil-commentary format-all auto-complete editorconfig haskell-mode counsel ivy go-mode rust-mode use-package treemacs-evil treemacs projectile doom-themes lsp-mode evil))) + '(web-mode sublimity typescript-mode glsl-mode format-all hl-todo elcord evil-tabs evil-commentary format-all auto-complete editorconfig haskell-mode counsel ivy go-mode rust-mode use-package treemacs-evil treemacs projectile doom-themes lsp-mode evil))) (custom-set-faces ;; custom-set-faces was added by Custom. @@ -138,3 +138,18 @@ ;; Loading config stuff (load "$HOME/.config/emacs/config.el") + +;; Lang stuff + +;; Typescript / webmode stuff +(setq web-mode-markup-indent-offset 2) +(setq web-mode-code-indent-offset 2) +(setq web-mode-css-indent-offset 2) +(use-package web-mode + :ensure t + :mode (("\\.js\\'" . web-mode) + ("\\.jsx\\'" . web-mode) + ("\\.ts\\'" . web-mode) + ("\\.tsx\\'" . web-mode) + ("\\.html\\'" . web-mode)) + :commands web-mode)