Add go-mode config
This commit is contained in:
parent
6bc67c0c82
commit
6e4565cd90
18
config.org
18
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user