← Back to context

Comment by pjmlp

2 years ago

Go suppport on VSCode was originally done by an intern at Microsoft, and then later there was an agreement with Google, for Google Go team to take over it.

No wonder. Of all the languages I code in in VSCode, Golang is the most frustrating to use as I can’t jump to definitions with Cmd + Click the way I can in JS, PHP or Java.

It there a decent alternative for Golang on the Visual Studio Code marketplace?

  • I can confirm it is frustrating experience overall, I've moved on to GoLand and later to IntelliJ with Go plugin for Go development and never looked back. Sadly IDEA products fall apart for me in projects where multiple technologies are used, i.e. tailwind, Ruby, anything with JS, so I can't ditch VSCode yet...

    • Can you elaborate on that, at least for js? We are a large (1k) fullstack development company and do all of our js / typescript SPAs and others on Intellij and I am not aware of it being an unpleasant experience.

      1 reply →

    • If you're using IDEA with plugins for each technology you should be able to add submodules which get their own interpreter.

      You may need to add interpreters first then there's a modules page in project settings you can select path and tool

  • > Of all the languages I code in in VSCode, Golang is the most frustrating to use as I can’t jump to definitions with Cmd + Click the way I can in JS, PHP or Java.

    Odd, what extensions are you using? I use only go.dev extension and intellisense has been working great for golang dev for years.

  • Jetbrains has a decent golang IDE. I don't use it because I use Vim. Vim's not for everyone.

    • Their ideavim plugin is pretty good. I didn't know at first, but it support an .ideavimrc file that allows you to set your own commands. Pretty much anything that you can do in a jetbrains product is connected to a command id that you can connect to a vim shortcut.

      Include the most popular vim plugins as well. Easy motion and Nerdtree. Doesn't support language specific plugins, but core jetbrains products covers that

    • I do the same (not for golang tho). However, vim plug-ins also "have network access", in fact they can just "system()" and call anything. No sandboxing at all. At least the source code of these plug-ins are not obfuscated/compressed.

      However, this makes me wonder how much of a surface attack this is.

      2 replies →

  • > Golang... I can’t jump to definitions with Cmd + Click

    That’s absolutely false. Did you refuse to install gopls or something?

    • Exactly. By the way, use F12 instead of clicking :).

      Even on emacs, using gopls, `Meta+.` (go to definition) works.

      I use some VS Code (when I need to do web stuff besides Go), some emacs, and both use gopls so support is pretty much equivalent in terms of functionality.

    • I think they must have, it's not quite on the level of Goland, but VSCode with all the necessary extensions works well for Go, and doesn't eat 32GB of my RAM to do it.

      5 replies →