VS Code Extension
Installing the TACT Language VS Code Extension
- Open Visual Studio Code.
- Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. It looks like a square within a square.
- In the Extensions view input box, type "TACT Language". You should see a dropdown with the extension "TACT Language" provided by KonVik. Probably, you would see the same extension provided by TON Community but this one is deprecated and we should use KonVik’s instead
- Click on the install button next to the extension name. Wait until the installation is complete.
- Once the extension is installed, you might need to reload VS Code. If necessary, there will be a Reload button next to the extension. Click on this button if it appears.
- The TACT Language extension should now be installed on your VS Code.
Enabling Format on Save for the TACT Language Extension
This guide will provide instructions on how to enable the Format on Save feature for the TACT Language extension in VS Code using the Command Palette and editing the JSON settings file.
-
Type
Preferences: Open Settings (JSON)
in the command palette. This will open yoursettings.json
file. -
Editing JSON Settings
-
You'll see a JSON object. We're going to add some properties to this object to enable format on save for the TACT Language extension.
-
Add the following lines inside the JSON object:
{ "[tact]": { "editor.formatOnSave": true, "editor.defaultFormatter": "KonVik.tact-lang-vscode" } }
-
This will enable format on save (
"editor.formatOnSave": true
) and set the default formatter for TACT files ("[tact]": {"editor.defaultFormatter": "KonVik.tact-lang-vscode"}
) to the TACT Language extension.
-
-
Saving and Closing Settings
- Save your
settings.json
file after adding these lines (You can pressCtrl+S
to save). - Close the
settings.json
tab or pressCtrl+W
.
- Save your
Your TACT Language VS Code extension should now automatically format your files when you save them. If you don't see these changes take effect immediately, you might need to reload VS Code.