The Visual Studio Code Plugin
The VS Code Ballerina plugin provides the Ballerina development capabilities in VS Code. Click on the below links for instructions on how to download, install, and use the features of the VS Code plugin.
Downloading VS Code
Download the Visual Studio Code editor.
Installing the plugin
Use either of the below approaches to install the VS Code Ballerina plugin.
Installing via the VS Code editor
Click Extensions on the left-most menu of the editor, search for the Ballerina plugin, and click Install.
Tip: Click Reload to reload the editor to apply the change.
This downloads the plugin and installs it.
Installing by downloading the plugin
- Download the Visual Studio Code Ballerina plugin.
- Follow either of the below approaches to install the plugin.
Using the VS Code editor
- Click View in the top menu of the editor and click Command Palette.
- In the search bar, type "vsix" and click Extensions: Install from VSIX....
- Browse and select the VSIX file of the plugin you downloaded.
Using the Command Line
In a new Command Line tab, execute the below command.
$ code --install-extension <BALLERINA-PLUGIN-DIRECTORY>
Tip: In the above command,
<BALLERINA_PLUGIN-DIRECTORY>refers to the path of the Ballerina plugin directory (i.e., the VSIX file) you downloaded.
Using the plugin
Tip: Ballerina Language Specification supports a set of experimental features such as transactions syntax. In order to be compatible with the experimental features and for supporting language intelligence in VSCode Plugin, enable the Allow Experimental option in user settings.
Troubleshooting: If you installed a new Ballerina version recently, you might need to restart the VS Code Editor to pick the new Ballerina version. Herein, If you are using Mac OS, press 'Command+Q' keys to quit the app and reopen it.
Click on the below links to find information on the various capabilities that are facilitated by the VS Code Ballerina plugin for the development process.