This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Multi-root support, Improvements to auto-completions, running/debugging tests and more..
Multi Root support when using VS Code Insiders
We now have Multi Root support for Go. PR 1221 Please note:
- The settings at Folder level takes precedence over the ones at the Workspace level which in turn take precedence over the ones at the User level
- You can have the different roots in the multi-root mode use different GOPATHs. The experimental language server feature is not supported in such cases though.
- All current Go related features that refer to "workspace" will refer to the individual roots in the multi root mode. For example: Build/lint/vet/test workspace or
Go to Symbol in workspace
. - Give it a try and log any issues that you find in the vscode-go repo
Auto-completion improvements
- Nuruddin Ashr (@uudashr)
- Auto-completion for unimported packages that are newly installed/built will now show up without the need for reloading VS Code.
- Completions from sub vendor packages that were showing up are ignored now. Fixes Bug 1251
- The
package
snippet completion is now smarter when suggesting package names. PR 1220. It suggestsmain
when current file ismain.go
or there exists amain.go
file in current folder- The folder name when the current file is
internal_test.go
- The folder name with
_test
when current file is a test file - If the folder name in above cases has
-
or.
, then what appears after the-
or.
is suggested.
- Alexander Kohler (@alexkohler)
- A new setting
go.useCodeSnippetsOnFunctionSuggestWithoutType
is introduced. This allows completions of functions with their parameter signature but without the parameter types. Feature Request 1241
- A new setting
- Miklós @kmikiy
- 3 New snippets for the
Log
methods from thetesting
package
- 3 New snippets for the
Improvements around running and debugging tests
- zhouhaibing089 (@zhouhaibing089)
- Running and debugging tests for packages in symlinked folders is now possible. PR 1164
- Katsuma Ito (@ka2n)
- The Debug Test codelens now uses the buildTags and buildFlags correctly. PR 1248
- Chase Adams (@chaseadamsio)
- You can now run tests from unsaved files. Fixes Bug 1225
- Ramya Rao (@ramya-rao-a)
- Changes done to coverage options and decorators in settings now apply immediately without the need for moving to another file and back. Fixes Bug 1171
- The Run Test and Debug Test codelens react to change in the codelens setting immediately without the need for moving to another file and back. Fixes Bug 1172
$workspaceRoot
will now be resolved when part ofgo.testEnvVars
andgo.toolsEnvVars
setting.
Improvements around Packages
- Nuruddin Ashr (@uudashr)
Go: Browse Packages
command will now include newly installed/built packages without the need for reloading VS Code.
- Hugo (@juicemia)
- A new command
Go: Get Package
is introduced to rungo get
on the package in the import statement under the cursor. PR 1222
- A new command