Skip to content

The Ant extension gives VS Code completion, diagnostics, navigation, formatting, and debugging. ​

Install from the Visual Studio Marketplace

Completion, with signatures. ​

Names in scope, the fields of a record after ., and the functions a pipe can continue with after |, each with its signature.

Errors as you type. ​

An error appears as you type, with its message on hover and in the Problems panel, and goes away with the fix.

Fixes from the checker. ​

The code action adds a record field the checker found missing.

The type on hover. ​

Signatures, types, and doc comments, for the standard library and your own code.

Signature help as you call. ​

The signature of the call being typed, with the active parameter marked.

Inferred types, shown inline. ​

Inlay hints show the type of every var and the name of every argument.

Formatted by ant fmt. ​

Format Document runs ant fmt, so every file is laid out the same way.

Go to definition, across modules. ​

⌘-click a name to open its declaration, in an imported module too, and Go Back returns.

Every use of a name. ​

The uses of a name are highlighted in the document, and Peek References lists them all.

Rename, everywhere. ​

F2 renames a variable and every use of it.

Symbols in the file and the workspace. ​

⌘T searches the workspace's symbols, and ⌘⇧O outlines the file.

Run a file. ​

Ant: Run File runs the current file with ant run. A task of type ant can be the default build task.

Run one test from the code. ​

In a test file, run test and debug test code lenses stand above each test and each subtest, and the output shows what failed.

Debug with F5. ​

No launch.json needed: breakpoints, stepping, every goroutine's stack and variables, values on hover, and the debug console.

Install from the Visual Studio Marketplace

The source is ant-src/vscode-ant. The extension needs ant, which Install explains.