在 Sublime 3 的 Debian 测试中启用/检测 GoSublime + Linters 时遇到问题。我已经在 OSX 和 Windows 机器上做了六次了,没有失败。
ST 控制台说:
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'
有趣的是它说它无法定位,go因为我之前在设置以前的错误(我已修复)时没有注意到它。Go 就在那里,正如 GoSublime 所示:
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}']
--------------------------------
GOBIN(未设置)是另一个有趣的,我承认我之前在其他系统上没有关注过。
所以这是我想象的从 GoSublime 插件代理的 Linter 插件配置的问题?我相信我已经正确设置了它,因为我复制粘贴目录并且它们在终端中运行(告诉我没有类型)。
# GoSublime.sublime-settings (User)
{
"env": {
"GOROOT": "/usr/local/go",
"GOPATH": "$HOME/go",
"PATH": "$PATH:$GOROOT/bin:$GOPATH/bin"
}
}
MarGo 也没有抱怨它再也找不到 GOPATH;所以,我确实设置了正确并被检测到。
相关分类