While there are many Layers on the main list of Spacemacs Layers, there are some that I have to have lots of return on your investment of time. I have tried to break this information down into parts: 1) General 2) Projecs.
I would say almost everyone who would consider using Spacemacs would probably agree that Git is a must. Therefore adding the layers:
This enables the package called
Magit (taking the work git and magic…is my guess..) which is just an amazing package that helps out with tons of Git based actions. Once you get down the basics of
branch you can pretty much stop there, or continue down the rabbit hole and see how deep you can harness the awesome power of
Buffers to refer to a piece of information that is open (file, process, etc…). Inside Spacemacs, you will be efficient in your time when being able to manage buffers. Enter
ibuffer the layer that makes you the epic controller of all buffers. Here are some of my favorite features:
- selecting buffers that are not saved
- removing buffers that are selected
- grouping of buffers
Warning.. this layer is quite complex and I really need a cheatsheet for myself as I do not use this layer all too often.
Getting ready for projects with Spacemacs can be easy and others can be a little more complex. But never fear! The docs are here!… below… split up by components of your stack…
The Spacemacs GoLang layer has some really good information, but I have found some of it to not work for me when using more recent versions of GoLang.
While starting out in my quest to learn more Go, I started to see what I need to do for configuring my Spacemacs editor to play well and help me without complaining about errors. This was not that straight forward and I will problably keep updating this area until I get it right.
- Installation instructions for the
go layergave some conflicting information for the version of
gothat I currently am using which is
- Configuring Spacemacs with
goenvpaths seemed to be missing from the internet.
- Resolving issues with the
goldmarkerror was also missing from the internet (at least for my situation, which turned out that
goplscommand was missing from my path)
Keep in mind that I am using
GoLang 1.17.1 and this might not work for previous versions.
export GO111MODULE=on CGO_ENABLED=0
go install -v -trimpath -ldflags '-s -w' github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install -v golang.org/x/tools/cmd/godoc@latest
go install -v golang.org/x/tools/cmd/goimports@latest
go install -v golang.org/x/tools/cmd/gorename@latest
go install -v golang.org/x/tools/cmd/guru@latest
go install -v github.com/cweill/gotests/...@latest
go install -v github.com/davidrjenni/reftools/cmd/fillstruct@latest
go install -v github.com/fatih/gomodifytags@latest
go install -v github.com/godoctor/godoctor@latest
go install -v github.com/haya14busa/gopkgs/cmd/gopkgs@latest
go install -v github.com/josharian/impl@latest
go install -v github.com/rogpeppe/godef@latest
go install -v golang.org/x/lint/golint@latest
- Add the following to
;; go layer
;; debug layer
;; autocompletion tries to make things easier
;; verifying syntax
;; helpful vcs
- Helping the editor of Spacemacs to know what paths are set from
Should get a prompt asking which environment variable you want to copy. I entered in
and this pulled in all the settings about
- If you do not have
goenvinstalled, then you might want the following variables loaded somewhere:
[ -d $HOME/go ] && export GOPATH="$HOME/go" || __debug "could not find $HOME/go"
[ -d $GOPATH ] && export PATH=$PATH:$GOPATH/bin
[ -d /usr/lib/go ] && export GOROOT="/usr/lib/go" || __debug "unable to find /usr/lib/go"
[ -d /usr/local/go ] && export GOROOT="/usr/local/go" || __debug "unable to find /usr/local/go"