summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-05-11 15:04:27 +0200
committerAlan Pearce2024-05-11 15:04:27 +0200
commit10563d73b1c4f87e78fd2a93dd0bfb9787701d99 (patch)
treedc7c039e1ec335d7b534546a528932e647ba8d20
parent9a7e1466e64eb706e11eeecef310983dfed88c12 (diff)
downloadnixfiles-10563d73b1c4f87e78fd2a93dd0bfb9787701d99.tar.lz
nixfiles-10563d73b1c4f87e78fd2a93dd0bfb9787701d99.tar.zst
nixfiles-10563d73b1c4f87e78fd2a93dd0bfb9787701d99.zip
emacs: use golines to format go files
-rw-r--r--user/emacs/init.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 9f035ffa..239e9e0a 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1111,11 +1111,12 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
                   '("shfmt"))
             (setq apheleia-formatters
                   (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"))))))
             (setf (alist-get 'go-ts-mode apheleia-mode-alist)
-                  '(goimports))
+                  '(golines))
             (setq apheleia-mode-alist (append apheleia-mode-alist '((nix-ts-mode . nixpkgs-fmt)
                                                                     (nix-mode . nixpkgs-fmt)
                                                                     (go-ts-mode . prettier-gotmpl))))