Skip to content

设置编辑器

🌐 Setup editors

编辑器扩展使用你项目中的 oxlint --lsp,因此必须在本地安装 oxlint

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

请参阅 快速入门 安装 Oxlint。

🌐 See Quickstart to install Oxlint.

支持的编辑器

🌐 Supported editors

VS Code

安装

🌐 Install

从以下位置下载官方 Oxc VS Code 扩展:

🌐 Download the official Oxc VS Code extension from:

该扩展与其他基于 VS Code 的编辑器兼容,包括 Cursor。

团队设置

🌐 Team setup

  1. 推荐给贡献者的扩展:

.vscode/extensions.json

.vscode/extensions.json
json
{
  "recommendations": ["oxc.oxc-vscode"]
}
  1. .vscode/settings.json 中启用保存时自动修复:
.vscode/settings.json
json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.oxc": "always"
  }
}
  1. .vscode/settings.json 中启用类型感知的代码检查:
.vscode/settings.json
json
{
  "oxc.typeAware": true
}

你还需要确保在你的项目中安装了 oxlint-tsgolint。更多详情请参阅类型感知的代码检查文档

🌐 You also need to ensure oxlint-tsgolint is installed in your project. See the type-aware linting docs for more details.

参考

🌐 Reference

Zed

安装

🌐 Install

参考

🌐 Reference

JetBrains

IntelliJ IDEA 和 WebStorm。

🌐 IntelliJ IDEA and WebStorm.

安装

🌐 Install

参考

🌐 Reference

coc.nvim

安装

🌐 Install

vim
:CocInstall coc-oxc

参考

🌐 Reference

其他编辑

🌐 Other editors

对于支持 LSP 的编辑器(Neovim、Emacs、Helix、Sublime),请配置:

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

bash
oxlint --lsp

参考

🌐 Reference