Having a problem getting GoSublime + Linters enabled/detected on Debian Testing in Sublime 3. I've done this a half a dozen times on OSX and Windows machines without fail.
The ST console says:
SublimeLinter: debug mode: off
SublimeLinter: annotations activated: <builtin>
SublimeLinter: WARNING: golint deactivated, cannot locate 'golint'
SublimeLinter: WARNING: gotype deactivated, cannot locate 'gotype'
SublimeLinter: WARNING: govet deactivated, cannot locate 'go'
Interesting how it says it can't locate go
as I haven't noticed that one before when setting things up with previous errors (that I fixed up). Go is there, as the GoSublime shows:
GoSblime r13.12.26-3 sh: load env vars ['/bin/bash', '--login', '-c', 'echo "..."']: go version: ['/usr/local/go/bin/go', 'version'] -> `go version go1.3.1 linux/amd64
` -> `go1.3.1`: 0.043s
GoSublime r13.12.26-3: init mod(mg9)
SublimeLinter: debug mode: off
SublimeLinter: json activated: <builtin>
SublimeLinter: annotations activated: <builtin>
** 2014-09-18 08:48:11.608847 **:
GoSublime init r13.12.26-3 (0.001s)
| install margo: no
| install state: done
| sublime.version: 3065
| sublime.channel: stable
| about.ann: a14.02.25-1
| about.version: r13.12.26-3
| version: r13.12.26-3
| platform: linux-x64
| ~bin: ~/.config/sublime-text-3/Packages/User/GoSublime/linux-x64/bin
| margo.exe: ~bin/gosublime.margo_r13.12.26-3_go1.3.1.exe (ok)
| go.exe: /usr/local/go/bin/go (ok)
| go.version: go1.3.1
| GOROOT: /usr/local/go
| GOPATH: ~/go
| GOBIN: (not set) (should usually be `(not set)`)
| set.shell: ['/bin/bash', '--login', '-c', '$CMD']
| env.shell: /bin/bash
| shell.cmd: ['/bin/bash', '--login', '-c', '${CMD}']
--------------------------------
The GOBIN (not set) is another interesting one that I admit I haven't paid attention to before on other systems.
So it's a problem with the Linter plugin configuration that is proxied from the GoSublime plugin I would imagine? I believe I have it set correctly, as I copy-n-paste the directories and they function in terminal (telling me there is no typeo).
# GoSublime.sublime-settings (User)
{
"env": {
"GOROOT": "/usr/local/go",
"GOPATH": "$HOME/go",
"PATH": "$PATH:$GOROOT/bin:$GOPATH/bin"
}
}
MarGo doesn't complain that it cannot find the GOPATH any longer either; so, I do have that set right and it is detected.
I even dug into the wonderful GoSublime settings today to try to resolve this and found the nugget about setting the shell command I can specify for bash; so, I now have this:
"shell": ["/bin/bash", "--login", "-c", "$CMD"],
"env": {
"GOROOT": "/usr/local/go",
"GOPATH": "$HOME/go",
"PATH": "$PATH:$GOROOT/bin:$GOPATH/bin"
},
But that didn't help either.
Using the following:
Debian Testing (all updated packages)
i3 Window Manager (though I don't think this worked with Gnome)
Go 1.3.1 (built from source release, located at /usr/local/go)
SublimeText 3 3065 (registered)
GoSublime (latest as of posting)
go get github.com/golang/lint (and working in terminal)
go get code.google.com/p/go.tools/cmd/gotype (works in terminal)
go vet (working in terminal)
All paths are setup correctly.
# i3wm
exec GOPATH="$HOME/go"
exec GOROOT="/usr/local/go"
exec PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
# .bashrc
export GOPATH="$HOME/go"
export GOROOT="/usr/local/go"
PATH="$PATH:$GOROOT/bin:$GOPATH/bin"
These work fine and I can run Go commands, install packages, etc from both terminal and from i3 (writing some custom statusbars in Go).
GoType and GoLint are installed as well, and I can run them from bash.
The general SublimeLinter is loaded with correct linters.
reloading plugin SublimeLinter-annotations.linter
SublimeLinter: annotations linter loaded
reloading plugin SublimeLinter-contrib-golint.linter
SublimeLinter: golint linter loaded
reloading plugin SublimeLinter-contrib-gotype.linter
SublimeLinter: gotype linter loaded
reloading plugin SublimeLinter-contrib-govet.linter
SublimeLinter: govet linter loaded
reloading plugin SublimeLinter-json.linter
SublimeLinter: json linter loaded
reloading plugin sublimelint.commands
reloading plugin sublimelint.sublimelint
But yet, I continue to get these errors as mentioned at the beginning.
Thanks in advance!