all repos — nixfiles @ c46e0e72210f0b4e977dab75ceccae51969523ae

System and user configuration, managed by nix and home-manager

Emacs: automatically open gotmpl files in web-mode
Alan Pearce alan@alanpearce.eu
Sat, 08 Jun 2024 20:46:52 +0200
commit

c46e0e72210f0b4e977dab75ceccae51969523ae

parent

90d3e62be2b2f923c85e1bc4492e42bad63a1467

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -893,11 +893,13 @@ :defer t) 
 (use-package web-mode
   :mode (("\\.html?.erb\\'" . web-mode)
+         ("\\.gotmpl\\'" . web-mode)
          ("\\.tmpl\\'" . web-mode))
   :config (setq web-mode-enable-auto-pairing nil
                 web-mode-style-padding 2
                 web-mode-script-padding 2
-                web-mode-engines-alist '(("go" . "\\.tmpl\\'"))))
+                web-mode-engines-alist '(("go" . "\\.tmpl\\'")
+                                         ("go" . "\\.gotmpl\\'"))))
 
 (use-package emmet-mode
   :ghook '(web-mode-hook sgml-mode-hook))