Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
improved gosublime config
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jan 11, 2017
1 parent 0e89a35 commit d330bba
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
6 changes: 5 additions & 1 deletion golang/install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/sh
if [ "$(which go)" ] && [ ! -z "$GOPATH" ]; then
if [ "$(which go)" ] && [ -n "$GOPATH" ]; then
mkdir -p "$GOPATH/bin" "$GOPATH/src/github.com/"

packages="
github.com/alecthomas/gometalinter
golang.org/x/tools/cmd/cover
golang.org/x/tools/cmd/godoc
github.com/nsf/gocode
golang.org/x/tools/cmd/guru
golang.org/x/tools/cmd/goimports
golang.org/x/tools/cmd/gorename
github.com/golang/lint/golint
"

for pkg in $packages; do
Expand Down
41 changes: 38 additions & 3 deletions sublime-text-3/GoSublime.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
{
"env": {
"GOPATH": "$HOME/Code/Go"
}
"autocomplete_suggest_imports": true,
"comp_lint_commands": [
{
"cmd": [
"goimports -w $_fn"
],
"shell": true
},
{
"cmd": [
"golint $_fn"
],
"shell": true
},
{
"cmd": [
"go",
"vet"
]
}
],
"comp_lint_enabled": true,
"env": {
"GOPATH": "$HOME/Code/Go:/usr/bin/go",
"PATH": "$HOME/Code/Go/bin:$PATH:/usr/bin"
},
"fmt_cmd": [
"gofmt",
"-s"
],
"on_save": [
{
"cmd": "gs_comp_lint"
},
{
"cmd": "go install"
}
]
}

0 comments on commit d330bba

Please sign in to comment.