r/vscode • u/multi_io • 4h ago
Golang: resolve missing imports

How do I do this in a convenient way? The standard Go extension is installed. On Jetbrains IDEs it would be something like cmd-space, select import you want from a fuzzy search, and it adds a corresponding import clause at the top of the file and package name/alias at the import site. It's been working like that for 10 years. In vscode, all you get is opt-Enter ("quickfix") and let an agent try to figure it out, which takes ages and will probably not do what you want.
If you generate all the code with Claude Code / Codex or a similar harness, it'll obviously take care of the imports, but sometimes I still write code manually or use some more pedestrian AI autocomplete like Supermaven, as in the above screencap, and it'll not add imports on its own, annoyingly. Anyway, you need some kind of reasonable deterministic fallback.
So what am I missing here?