Skip to content

Setup editors

Editor extensions use oxfmt --lsp from your project, so oxfmt must be installed locally.

See Quickstart to install Oxfmt.

Supported editors

VS Code

Install

Download the official Oxc VS Code extension from:

The extension is compatible with other VS Code-based editors, including Cursor.

Team setup

  1. Recommend the extension for contributors:

.vscode/extensions.json:

.vscode/extensions.json
json
{
  "recommendations": ["oxc.oxc-vscode"]
}
  1. Enable format on save in .vscode/settings.json:
.vscode/settings.json
json
{
  "oxc.fmt.configPath": ".oxfmtrc.json",
  "editor.defaultFormatter": "oxc.oxc-vscode",
  "editor.formatOnSave": true
}

To set per language:

.vscode/settings.json
json
{
  "[javascript]": {
    "editor.defaultFormatter": "oxc.oxc-vscode",
    "editor.formatOnSave": true
  },
  "[typescript]": {
    "editor.defaultFormatter": "oxc.oxc-vscode",
    "editor.formatOnSave": true
  }
}

Reference

Zed

Install

Reference

JetBrains

IntelliJ IDEA and WebStorm.

Install

Reference

coc.nvim

Install

vim
:CocInstall coc-oxc

Reference

Other editors

For editors with LSP support (Neovim, Emacs, Helix, Sublime), configure:

bash
oxfmt --lsp

Via stdin

For editors without LSP support:

sh
cat foo/bar.js | oxfmt --stdin-filepath f.js --config ./path/to/config.json

Reference