This extension requires Visual Studio 17.3 or above.
Key features of the Bicep Visual Studio extension
The Bicep Visual Studio extension is capable of many of the features you would expect out of other language tooling. Here is a comprehensive list of the features that are currently implemented.
The Bicep compiler validates that your code is authored correctly. We always validate the syntax of each file and whenever possible also validate the return types of all expressions (functions, resource bodies, parameters, outputs, etc.). Bicep is more restrictive than ARM Templates, so certain behaviors in ARM Templates that you have used may not be supported and result in an error in Bicep. For example, we no longer allow math functions like add() because we support the + operator. See Bicep Type System for more information about Bicep data types and the type validation rules.
Bicep provides IntelliSense for the core language and extends to support type definitions for all resource types in Azure.
Type . for any object to view and autocomplete its properties. Works on any param or var of type object, and any resource or module properties (e.g. myModule.outputs.).
Resource property names & property values
Bicep knows the allowed properties and values for any resource or module declaration.
List all available resource types
Easily explore all available resource types and api versions for a given type. You can type partial fragments of the type and Bicep will narrow the list down accordingly.
Other IntelliSense and completions
Bicep has a small set of snippets for core language keywords (param, var, resource, module, output). The snippets are contextual, so they should only show up in the places they are valid. All of the ARM Template resource snippets available in the ARM Tools VS Code extension are available as Bicep resource snippets.
The Bicep language service supports document symbols, which help power a broad set of code navigation features.
Go to definition, peek definition
Find all references, peek references
When your cursor is on or in a particular symbol, Bicep will highlight other uses of that symbol. The color of the highlight is different for declarations of a symbol as opposed to accessing a symbol.
You can rename any symbol such as a param or resource and Bicep will intelligently rename all the uses of that symbol.
We support the Format Document command and we insert spaces with a default tab size of 2.
You can change the default settings via Tools -> Options.
For small issues like misspelled symbols or incorrect casing, Bicep will offer a "Quick fix" option.