From ed3b8982fdc50c2e79532a203f749a8f96e538f8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 11 May 2024 15:05:16 +0200 Subject: emacs: fix auto-formatting setup for go templates --- user/emacs/init.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/user/emacs/init.el b/user/emacs/init.el index 239e9e0a..40c83846 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -1113,13 +1113,14 @@ _C-k_: prev _u_pper _=_: upper/lower _s_mart resolve (append apheleia-formatters '((nixpkgs-fmt "nixpkgs-fmt") (golines "golines") (prettier-gotmpl - ("prettier" "--stdin-filepath" filepath - "--parser=go-template" (apheleia-formatters-js-indent "--use-tabs" "--tab-width")))))) + "prettier" "--stdin-filepath" filepath + "--parser=go-template" (apheleia-formatters-indent "--use-tabs" "--tab-width"))))) (setf (alist-get 'go-ts-mode apheleia-mode-alist) - '(golines)) + '(golines) + (alist-get 'web-mode apheleia-mode-alist) + '(prettier-gotmpl)) (setq apheleia-mode-alist (append apheleia-mode-alist '((nix-ts-mode . nixpkgs-fmt) - (nix-mode . nixpkgs-fmt) - (go-ts-mode . prettier-gotmpl)))) + (nix-mode . nixpkgs-fmt)))) (add-hook 'apheleia-mode-hook #'turn-off-format-all-mode)) :init (progn (apheleia-global-mode +1))) -- cgit 1.4.1