Go JetBrains 家新的 Golang IDE 开始接受内测申请

lgn21st · 2016年12月16日 · 最后由 michael 回复于 2016年12月30日 · 4958 次阅读

博客上说是从 IDEA 的 go-lang-idea-plugin 发展起来的,有一个专门的团队已经埋头搞了三年了,目测比 VS Code + Go Plugin 靠谱,目前开始接受内测申请。


共收到 13 条回复

八空格缩进…有点吓人。现在 gofmt 是这样默认的么?

#1 楼 @cuebyte gofmt 强制缩进是两个 tab,tab 的好处是怎么显示是可以自定义,而我则习惯了 Ruby 的 coding style,设置成两个空格。

对现在的 go-lang-idea-plugin 还是挺满意的,除了每个新的 project 要重新配一下 GOPATH 不方便。


The goal of the GOPATH is to centralize all packages into one common workspace. It is not really a new concept by itself (think of the java classpath for example), but Go use in a drastically simple way by not supporting packages versionning. The Go programmer isn't suposed to set GOPATH manually when entering a new project folder. Each project folder is supposed to be a package by itself, and reside in the GOPATH along other packages, so GOPATH should be set only once. Tutorials begin by setting the GOPATH in order to isolate the tutorial workspace from anything other. GOROOT is set to provide the standard packages to the Go programmer, you don't need to do anything with it. To put it short, there is a single rule for GOROOT: never, ever, touch it. Don't install anything in it, don't modify standard packages, etc. I'm not aware of a tool to detect go projects in the current directory, but it shouldn't be highly complex to create. How you handle differents projects is up to you. The go way to do it is to put every project as a package in the $GOPATH/src dir and do everything from there. As I don't really like it, I defined my GOPATH to be $HOME/.go. Then I put each project in a dedicated directory somewhere else (anywhere in my computer), and symlink the project directory into my $GOPATH/src dir. I can then use every command compile as nothing, use the project as package for another one, etc.

#3 楼 @nouse

Atom 泪流满面,表示代码跳转只能靠 git grep ....

JetBrains 家的东西都好重

#5 楼 @small_fish__ Emacs 都可以根据语义跳转,没道理 Atom 不行吧

#7 楼 @thewawar 目前没有找到好用的。

其实 VS Code + gocode 已经非常好用了

@lgn21st 我还是用 VS Code 了...

不敢相信是 “埋头搞了三年” 搞出来的

#10 楼 @miclle 我这里到没有这么夸张,很多东西都还在体验中,感觉很多东西还有带我去挖掘。

#9 楼 @huacnlee 我下了个 vscode,不知道是不是我的原因,各种 ruby 插件都装上了,就是没有提示呃,我想问下,大家写 ruby 都是不用代码提示补全的吗?这用起来太可怕了

Gemfile 比 GOPATH 不知高到哪里去了

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册