From 7f9f8d8c034a16481a943e2fa54abd132d7ba4d7 Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Wed, 30 Sep 2015 11:01:28 +0200 Subject: [PATCH] Document gofmt-command Fix #3065 --- layers/+lang/go/README.org | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/layers/+lang/go/README.org b/layers/+lang/go/README.org index 894f703cfac2..206d443cb718 100644 --- a/layers/+lang/go/README.org +++ b/layers/+lang/go/README.org @@ -8,12 +8,13 @@ - [[#install][Install]] - [[#pre-requisites][Pre-requisites]] - [[#layer][Layer]] + - [[#configuration][Configuration]] + - [[#formatting][Formatting]] - [[#working-with-go][Working with Go]] - [[#go-commands-start-with-m][Go commands (start with =m=):]] - [[#go-oracle][Go Oracle]] * Description - This layer adds extensive support for go. ** Features: @@ -24,7 +25,6 @@ This layer adds extensive support for go. * Install ** Pre-requisites - You will need =gocode= and =godef=: #+BEGIN_SRC sh @@ -36,13 +36,22 @@ You will need =gocode= and =godef=: Make sure that =gocode= executable is in your PATH. ** Layer - To use this contribution add it to your =~/.spacemacs= #+BEGIN_SRC emacs-lisp (setq-default dotspacemacs-configuration-layers '(go)) #+END_SRC +* Configuration + +** Formatting +By default, go buffers are run through =gofmt= on save. To use a different +formatter, set the value of =gofmt-command=, e.g. + +#+begin_src emacs-lisp + (setq gofmt-command "goimports") +#+end_src + * Working with Go ** Go commands (start with =m=):