Skip to content

VS Code Extension

TIP

This page is for contributing to the Oxc VS Code extension. To download the extension, see the Visual Studio Marketplace or the Open VSX Registry.

Development

Clone the oxc-vscode repository and run pnpm install.

Building and running the extension locally

There are two options for running and testing your changes to the Oxc VS Code extension.

Via command line:

  • Run pnpm build to compile the VS Code extension and build the release version of the language server.
  • Run pnpm install-extension to install it into VS Code.
  • Press Ctrl + Shift + P and search for "Developer: Reload Window".
  • You are now able to manually test your changes inside VS Code.

Via VS Code itself:

  • Open the oxc-vscode repository in VS Code.
  • Go to the "Run and Debug" tab in the left sidebar of your editor.
  • Select the Launch VS Code Extension configuration.
  • Click the green play button at the top.
  • This will build the VS Code extension and launch a new VS Code window with the newly built VS Code extension installed.

Testing unreleased versions of oxlint/oxfmt

Build the project in the oxc project with:

bash
cd apps/oxlint && pnpm build-test
cd ../oxfmt && pnpm build-test
``````json
{
  "oxc.path.oxlint": "/path/to/oxc/apps/oxlint/dist/cli.js",
  "oxc.path.oxfmt": "/path/to/oxc/apps/oxfmt/dist/cli.js"
}
``````json
{
  "oxc.trace.server": "verbose"
}