Is anyone here using the new IDE by Jetbrains, Gogland?

agolangf · · 590 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<hr/>**评论:**<br/><br/>F21Global: <pre><p>Yes. I was using PHPStorm with the <code>go-lang-idea-plugin</code> and have switched over to Gogland.</p> <p>So far, it appears to be fine, although I haven&#39;t tried out all the features.</p> <p>One major deficiency is the lack of format on save. I&#39;ve tried the Save Actions plugin, but it couldn&#39;t be enabled. I tried creating a macro, but I didn&#39;t like the flash when it selected the contents of the file. I ended up installing the File Watcher plugin and making it call go fmt on save.</p> <p>Another problem I encountered is that when refactoring the name of something in code, it will go and rename that word in comments and other non-code files as well. Sometimes we want to do that and sometimes not, but it has been pretty annoying. I am sure there&#39;s a way to modify the behavior, but I haven&#39;t gotten around to investigating it yet.</p> <p>I did run into a performance issue where real time code analysis would take ages after installing some editor plugins, but after disabling the protobuf and CMD plugins, things appear to be normal again.</p> <p>So far, I think the IDE is pretty solid and should be a pretty good product. Since most of my work is now in Go rather than PHP, it makes sense to drop PHPStorm for Gogland.</p></pre>howyoudoingchief: <pre><p>The lack of format on save has been a pain point for me as well. It generally keeps formatting consistent with the gofmt standard as you write, but the imports are usually out of sync: Code &gt; Optimize Imports (alt+ctrl+o) helps.</p></pre>dlsniper: <pre><p>You can use the Code | Show Reformat File Dialog and then tick the option to run Optimize Imports when formatting which will make the IDE behave like goimports on save since instead of pressing CTRL+S you&#39;d need to press CTRL+L (or whatever the key is for formatting).</p></pre>dlsniper: <pre><p>Regarding the format on save, please watch for updates in the <a href="https://youtrack.jetbrains.com/issue/GO-31">https://youtrack.jetbrains.com/issue/GO-31</a> issue.</p> <p>The internal formatter needs to be on par with gofmt and the developers know this and will be as such before 1.0 is released. </p> <p>There are several reasons the IDE does not use gofmt on save is:</p> <ul> <li>the internal formatter is needed in order to produce the code from refactoring and various other code generation facilities.</li> <li>there are several points in the IDE that can trigger a save action.</li> </ul> <p>If you miss having gofmt on save, you can either bind a key to gofmt/goimports and instead of using CTRL+S then use that or, as you said, setup the File Watchers plugin (but that might give you a not so nice experience).</p> <p>If you do identify any issues in formatting the code with the internal formatter, please do report them as unfortunately the Go team did not want to provide a specification for this (see: <a href="https://groups.google.com/forum/#!msg/golang-nuts/JBvEoyPJlL0/-jDNgEWS1McJ">https://groups.google.com/forum/#!msg/golang-nuts/JBvEoyPJlL0/-jDNgEWS1McJ</a> ).</p> <p>As for the other issues, for refactoring, press twice the shortcut and you&#39;ll get a dialog for this which will allow you to specify for how this should behave.</p> <p>Thank you for the nice words and if you encounter any issues or think of any features you&#39;d like to see, please either open an issue here: <a href="https://youtrack.jetbrains.com/issues/Go">https://youtrack.jetbrains.com/issues/Go</a> or ping me and I&#39;ll be happy to help you out.</p></pre>callcifer: <pre><blockquote> <p>Another problem I encountered is that when refactoring the name of something in code, it will go and rename that word in comments and other non-code files as well.</p> </blockquote> <p>I reported <a href="https://youtrack.jetbrains.com/issue/GO-3143" rel="nofollow">that issue</a> and the fix was included in yesterday&#39;s update. Try doing it again :)</p></pre>headzoo: <pre><p>Are there any compelling reasons to switch from PhpStorm (with plugin) to Golangd?</p></pre>mearkat7: <pre><p>This is hilarious, it&#39;s not really a go tool if you can&#39;t even run gofmt on save. Most basic text editors with a plugin have this functionality.</p></pre>dlsniper: <pre><p>I&#39;m sorry that you think this is hilarious but the &#34;most basic text editors&#34; as you call them, do not provide the level of functionality an IDE provides, so the comparison is not fair for the text editors.</p> <p>As for the reasons why this is not done in the IDE, please see the explanation here: <a href="https://www.reddit.com/r/golang/comments/5nlybr/is_anyone_here_using_the_new_ide_by_jetbrains/dccltrj/">https://www.reddit.com/r/golang/comments/5nlybr/is_anyone_here_using_the_new_ide_by_jetbrains/dccltrj/</a> (tl;dr is: because it&#39;s not a simple text editor but yet it&#39;s still possible to via a plugin).</p></pre>mearkat7: <pre><p>I think the issue for me is that the go tooling is crazy good. Better than any other language i&#39;ve used. Because of that most text editors that have a plugin system can basically piggyback off the great work that&#39;s been done and provide a very complete editor without much work at all. Within a few minutes you can easily setup your editor to format on save, nice autocompletion, typing tips, debugging etc.</p> <p>The reason why I say it&#39;s hilarious is that gofmt to me is a corner stone of the language. It is the reason all code is written to the beautiful standard that they&#39;ve created. Although I am sympathetic to the fact that they don&#39;t provide the gofmt source, I was unaware of this. I think poor tooling is why things like phpstorm and webstorm are so great but in a language where the ecosystem and tooling is fantastic I would argue it is less required.</p></pre>dlsniper: <pre><blockquote> <p>Because of that most text editors that have a plugin system can basically piggyback off the great work that&#39;s been done and provide a very complete editor without much work at all.</p> </blockquote> <p>Yes, that&#39;s true. But that&#39;s where an editor piggy backing off something vs and IDE counts. There are many things that are much slower or very hard to do in those editors where as an IDE that understands the source code can actually do a lot more work. All the editing and refactoring features can work on broken code for example. And all the inspections run as you type instead of waiting until you save to give you information about the state of your code.</p> <p>And, perhaps the best feature of all, you need not install anything else but the plugin / IDE itself and that&#39;s it. Not even configuration might not be needed, aside maybe from the initial GOPATH / Go SDK. And you get to have features like this: <a href="https://youtu.be/dN1KOz_cDn0">https://youtu.be/dN1KOz_cDn0</a> which without constantly upgrading and maintaining a host of other additional tools that might break and become incompatible with your editor. These things are very important for a person just learning the language and not wanting to deal with such complexities.</p></pre>mearkat7: <pre><p>Potentially but I don&#39;t think there&#39;s anything you&#39;ve mentioned that I either A. Can&#39;t do or B. Is a feature I found I lack. Like I said for a language with a good eco-system I just find the trade offs for an ide in terms of bulk/speed/screen realestate not worth it.</p> <p>I guess it just depends on the person, like you said this might be suited to somebody just learning. Not configuring something to me isn&#39;t a positive. There is almost no piece of software i&#39;m not going to want to tinker with as soon as I get it so to me setting up and installing one plugin isn&#39;t a big deal. I can also edit/setup just about any environment without the need for a specific IDE per language. </p></pre>dlsniper: <pre><p>Yes, actually it is. Gofmt doesn&#39;t work on source code that doesn&#39;t compile as an example.</p> <p>The devs acknowledged this issue btw: <a href="https://youtrack.jetbrains.com/issue/GO-31">https://youtrack.jetbrains.com/issue/GO-31</a> and there are simple ways to get it working.</p> <p>As for speed, there are a few performance issues / optimizations that need to be done at the moment (it&#39;s still a young product and not even in public release) while the screen estate can be minimized to the extent that there&#39;s only your code on the screen and that&#39;s it :)</p> <p>But to each its own tool. You don&#39;t like IDEs, I love good IDEs.</p></pre>mearkat7: <pre><p>The linter catches this before save though so it&#39;s not an issue i&#39;ve run into, nor did I even realise it was the case because the issues get caught earlier haha. </p> <p>Very true! Keep up the good work for the IDE users of the world! </p></pre>dlsniper: <pre><p>The linter will not catch anything because the code cannot compile and thus it won&#39;t run :) </p></pre>kevinherron: <pre><p>Yes. Was using VS Code. Gogland is already better. Stoked there&#39;s a proper IDE happening.</p></pre>materialdesigner: <pre><p>Yep mostly very happy with it. Very excited to see it evolve.</p></pre>mdwhatcott: <pre><p>ALL DAY EVERY DAY.</p> <ol> <li>If you&#39;ve already fallen in love with JetBrains products this is a no-brainer--of course you&#39;re using Gogland! </li> <li>If you feel that go doesn&#39;t need an IDE with the features provided by a JetBrains IDE and you aren&#39;t willing to adjust to the way a JetBrains IDE works, well, of course you&#39;re not using Gogland.</li> </ol></pre>9gPgEpW82IUTRbCzC5qr: <pre><p>is there a way to essentially have all the Gogland features inside my existing IDEA install?</p> <p>I like to have java and golang projects open at the same time</p></pre>dlsniper: <pre><p>For the moment this is not possible. Later on this year, IntelliJ IDEA Ultimate and other paid IDEs will get a Go plugin that will provide the same functionality as Gogland does.</p></pre>Csokas: <pre><p>Not yet, but I will in the near future. </p></pre>disq: <pre><p>I was using PHPStorm (with the Go plugin) for most of my Go projects. (Long story short: The first Go project I worked on had heavy javascript in it as well, and I was already using PHPStorm + PyCharm everyday, PHPStorm suited better)</p> <p>First I switched all my non-Java projects (PHP, Go, Python) from their respective IDEs to IDEA, where the occasional Java projects lived. Tried to set up VS.Code for a while, couldn&#39;t set it up the way I liked. Then as soon as Gogland was released I jumped right to Gogland. Way faster. Still using IDEA for other languages. (Lucky, didn&#39;t have to open a single PHP project in months)</p> <p>BTW I don&#39;t use most of the built-in refactoring tools. My makefile runs gofmt, I occasionally use the gorename and go guru tools, but almost never the IDE features. Except for shift-F6 rename symbol, I guess. It&#39;s like a glorified SublimeText for me. In my defense I&#39;ve been using Sublime/TextMate/UltraEdit32 for well over a decade, so that&#39;s that I guess. (Still use Sublime for my plaintext and SQL needs)</p></pre>Shalard_doctor: <pre><p>I use ctrl+click a lot to jump to the definition</p></pre>disq: <pre><p>yeah that too :) middle mouse click does the same thing.</p></pre>mrsinham: <pre><p>Yes and I&#39;m loving it. I use a macro to do goimports on save, works perfectly. It&#39;s able on fly to tell what interfaces are implemented on a type, for example.</p></pre>dlsniper: <pre><p>Yes. And a lot of other people are on Slack <a href="https://gophers.slack.com/messages/gogland/">https://gophers.slack.com/messages/gogland/</a></p></pre>niosop: <pre><p>Tried it for about 10 minutes, then went back to VS code. May give it another shot, didn&#39;t give it enough time to be fair to it.</p></pre>dlsniper: <pre><p>I&#39;d be very happy to hear the feedback from you, please write me a PM either here, on twitter or slack or open an issue on YouTrack. And I hope you&#39;ll give it another chance. If you do, I&#39;d be happy to help you out with any issues you may have. Thank you.</p></pre>callcifer: <pre><p>I&#39;ve been using the original plugin for a long time so when they announced the EAP for the new IDE I jumped right in.</p> <p>It works almost perfectly, and whatever bugs there are, they are <em>very</em> quick to respond. I reported 2 bugs in the first EAP, one of them was fixed within <em>hours</em> (and got released ~yesterday) which is absolutely amazing.</p> <p>The other is a cosmetic improvement so it&#39;s very low priority, but it was still acknowledged and assigned within a day which is impressive.</p></pre>nastus: <pre><p>I&#39;ve been using Gogland since I got the email, also used phpstorm up until then. Only reason for me to switch really was what I&#39;m hoping is going to be better native support for various things in this ide </p></pre>smantziaris: <pre><p>I am missing a lot of features of VS Code, but in some points Gogland is better. I liked the OOTB debugging of tests!!!</p> <p>I do not like that it has a slow startup and that the memory consumption is enormous (1,2 GB RAM).</p> <p>I miss the hover over a function and see the arguments...</p> <p>I miss go fmt on save...</p> <p>I miss auto remove of unneeded imports...</p> <p>I still use vs code for quick and dirty work!!</p></pre>fork_that: <pre><blockquote> <p>I do not like that it has a slow startup and that the memory consumption is enormous (1,2 GB RAM).</p> </blockquote> <p>All JetBrains IDEs are like that. There are tips and tricks to reduce it, basically it&#39;s disable stuff you don&#39;t need. But in a world where browsers take up GB of RAM an IDE doing it doesn&#39;t seem so bad.</p></pre>dlsniper: <pre><blockquote> <p>I do not like that it has a slow startup and that the memory consumption is enormous (1,2 GB RAM).</p> </blockquote> <p>If you have a bit of time to spare, can you please help improve the startup of the IDE by providing a snapshot of it starting? You can follow the instructions here: <a href="https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems" rel="nofollow">https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems</a> and it would mean a lot. Thank you.</p> <blockquote> <p>I miss the hover over a function and see the arguments...</p> </blockquote> <p>You can do this by using hover+CTRL (or CMD I think on Mac). Or you can enable the &#34;Show quick documentation on mouse over&#34; option in Settings | Editor | General (and scroll down a bit, in Other section).</p> <blockquote> <p>I miss go fmt on save...</p> </blockquote> <p>You can have this by using the shortcut to either gofmt or goimports, a macro or a File Watchers plugin. Please watch this issue: <a href="https://youtrack.jetbrains.com/issue/GO-31" rel="nofollow">https://youtrack.jetbrains.com/issue/GO-31</a> for further updates.</p> <blockquote> <p>I miss auto remove of unneeded imports...</p> </blockquote> <p>You can enable the &#34;Optimize imports&#34; option in Code | Show Reformat File Dialog and then every time you&#39;ll use the builtin formatter it will also fix the imports. You can also choose a style for the imports from Settings | Go | Imports between gofmt and goimports.</p> <p>Please open up issues or ping me if you have any further questions and I&#39;d be happy to help. Thank you for your feedback.</p></pre>ZetaHunter: <pre><p>I reckon I will get downvoted to oblivion for not agreeing with the majority here, but personally I have found myself enjoying working with VS Code, it has everything I need, and I am coming from Python/PyCharm, my current dev environment (docker, etc) is strained on memory and I just can&#39;t have my editor eat a whole gig or two alone on that in exchange for some fancy thing.</p></pre>dlsniper: <pre><p>You post an irrelevant answer to a very well defined question and you &#34;rekon I will get downvoted&#34;. What do you expect? To get upvoted instead?</p> <p>Some people like IDEs, some people don&#39;t. Some can run them, some can&#39;t because of resource constraints, some can close some tabs in Chrome and can run IDEs instead of text editors. There are so many variations... :)</p></pre>Queue29: <pre><p>Really needs to support format on save. Until then I&#39;ll be sticking to VSCode, but really looking forward to making the switch! </p></pre>dlsniper: <pre><p>It has support for this, please see my reply here: <a href="https://www.reddit.com/r/golang/comments/5nlybr/is_anyone_here_using_the_new_ide_by_jetbrains/dcdewck/" rel="nofollow">https://www.reddit.com/r/golang/comments/5nlybr/is_anyone_here_using_the_new_ide_by_jetbrains/dcdewck/</a> Thank you.</p></pre>slierr: <pre><p>How can i test the ide? I already subscribed to early build but still didnt get any email from JB</p></pre>: <pre><p>[removed]</p></pre>snippet2: <pre><p>Need more information on DB drivers!</p></pre>dlsniper: <pre><p>Hi <a href="/u/snippet2" rel="nofollow">/u/snippet2</a>,</p> <p>Can you please give some more details about this? Gogland currently supports the following database engines: <a href="https://www.jetbrains.com/help/idea/2016.3/database-tool-window.html#d1483985e929" rel="nofollow">https://www.jetbrains.com/help/idea/2016.3/database-tool-window.html#d1483985e929</a> and the documentation from here: <a href="https://www.jetbrains.com/help/idea/2016.3/database-tool-window.html" rel="nofollow">https://www.jetbrains.com/help/idea/2016.3/database-tool-window.html</a> should apply to Gogland as well.</p> <p>If you have any troubles using it, please let me know or feel free to open an issue.</p> <p>Thank you.</p></pre>ryati: <pre><p>How do you pronounce this? gog-land? go-gland?</p></pre>whizack: <pre><p>goʊglænd is how i say it.</p> <p>i&#39;m using this <a href="http://public.oed.com/how-to-use-the-oed/key-to-pronunciation/" rel="nofollow">key</a> </p> <p>It should sound like the g could be a soft h and there are no hard stops. It shouldn&#39;t sound like a Go.gland or a Gog.land, it&#39;s more like a (gh)ogueland.</p></pre>dlsniper: <pre><p>It is pronounced Gogland, as the island it takes the name from: <a href="https://en.wikipedia.org/wiki/Gogland" rel="nofollow">https://en.wikipedia.org/wiki/Gogland</a></p></pre>Redundancy_: <pre><p>I hadn&#39;t seen this, but I&#39;m going to look now. Atom &amp; GoPlus have been a bit painful for working on separate projects + vendoring</p></pre>comrade-jim: <pre><p>No I use an editor called <code>vim</code>.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

590 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传