VS Code Extension

VS Code Extension

Installing the TACT Language VS Code Extension

  1. Open Visual Studio Code.
  2. 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.
  3. 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
  4. Click on the install button next to the extension name. Wait until the installation is complete.
  5. 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.
  6. 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.

  1. Type Preferences: Open Settings (JSON) in the command palette. This will open your settings.json file.

  2. 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.

  3. Saving and Closing Settings

    • Save your settings.json file after adding these lines (You can press Ctrl+S to save).
    • Close the settings.json tab or press Ctrl+W.

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.

References and Resources