diff --git a/config.org b/config.org index 5c086c5..95d14e5 100644 --- a/config.org +++ b/config.org @@ -1261,6 +1261,24 @@ (use-package scad-mode) #+end_src +** Go + First of all, of course, install =go-mode=: + + #+begin_src emacs-lisp + (use-package go-mode) + #+end_src + + This package provides a convenient lil function to use gofmt to + format a buffer; I want to run this whenever I save a go source + file. This is pretty easily done by adding a =before-save-hook= in + a =go-mode-hook= (hey, I heard you like hooks...) + + #+begin_src emacs-lisp + (add-hook 'go-mode-hook + (lambda () + (add-hook 'before-save-hook 'gofmt-before-save))) + #+end_src + * Tool Integrations ** Git =magit= is truly a wonderful creation! Add keybinding for