|
|
|
|
|
by nwsm
929 days ago
|
|
> VS Code almost daily at work for writing Go How would you rate VS Code for Go? I use the official Go extension but am not impressed. My main gripe is that I often have to manually add a local import that should have been found and suggested when I typed the name of a variable or function exported from an adjacent package. I much prefer Goland, but use VS Code because it is the only editor my company's internal AI code assistant supports. |
|
IMO: gopls is only just barely good enough to stop people from building an actually good replacement. Highlighting and build error stuff is reliable, but it regularly misses extremely straightforward type lookups, navigation, and autocomplete hints and that makes it untrustworthy in pretty much all cases. Basically everyone I know who uses it (somewhere between 50 and 100 people that I've talked with about this) relies on plain text search to get around and find things rather than doing type-driven stuff, because otherwise they fail to discover a lot.
All of which means it's insane and awful to me, barely better than "it doesn't support Go but Go looks close enough to C that it mostly works"-style ctags. And sometimes worse: even unsupported-language-fallback stuff in random tools sometimes gives much better autocomplete than gopls, which for me semi-routinely fails to hint things defined in the same file.
---
GoLand by comparison is wildly more capable, stable, and controllable. It actually works, and e.g. if you "find usages" you get a complete and precise result. Highly recommended if you do a lot of Go work. The single exception is that it doesn't support GOPACKAGESDRIVER (because it isn't gopls), so if e.g. you've got a complicated/abnormal Bazel setup it won't integrate well.