Skip to content

VS Code 扩展 V3

The brand of the project. It says "Biome, toolchain of the web" The brand of the project. It says "Biome, toolchain of the web"

我们很高兴地宣布 Biome VS Code 扩展程序的 3.0 版本现已发布!此版本包含一系列新功能和改进,旨在提升你的开发体验:

¥We’re excited to announce that version 3 of the Biome VS Code extension is now available! This release includes a range of new features and improvements to make your development experience even better:

  • 🗄️ 支持多根工作区

    ¥🗄️ Support for multi-root workspaces

  • 📝 支持单文件模式

    ¥📝 Support for single-file mode

  • 👻 支持未保存的文件

    ¥👻 Support for unsaved files

  • 🔄 Biome 更新后自动重新加载

    ¥🔄 Automatic reload after updating Biome

  • ⚙️ 配置更改后自动重新加载

    ¥⚙️ Automatic reload after configuration changes

  • ✨ 改进状态指示器

    ¥✨ Improved status indicator

¥Multi-root workspaces

Biome 扩展现在支持 多根工作区,因此你可以在单个 VS Code 窗口中并排处理多个项目。现在,每个工作区文件夹都运行着独立的 Biome 实例,从而保持项目之间的隔离。

¥The Biome extension now supports multi-root workspaces, so you can work on multiple projects side by side in a single VS Code window. Each workspace folder now runs its own independent Biome instance, keeping your projects isolated.

:::caution[heads up for pre-release users] If you’ve been using the pre-release

请注意,在过去几个月的版本中,最终版本已移除对 biome.projects 设置的支持。现在,我们建议使用多个工作区文件夹来管理多个

¥version over the past few months, please note that support for the biome.projects setting has been removed in the final release. We now recommend using multiple workspace folders instead to manage multiple

projects. :::

¥Single-file mode

有时,你只需要快速编辑某个文件。该扩展程序现在完全支持单文件模式,方便处理不属于完整项目的文件。

¥Sometimes you just need to make a quick edit to that one file. The extension now fully supports single-file mode, making it easy to work with files that aren’t part of a full project.

code that-one-file.js

要使用此功能,请确保你已启用 全局安装 Biome。即使你忘记了也不用担心,如果扩展程序在你的 PATH 中找不到 Biome,它会通知你。

¥To use this feature, make sure you have Biome installed globally. No worries if you forget, the extension will let you know if it can’t find Biome in your PATH.

¥Unsaved files & VS Code settings

该扩展程序现在支持格式化和检查未保存(未命名)的文件,以及你的 VS Code 设置。打开此类语句时,扩展程序会按需启动一个全局 Biome 实例。

¥The extension now supports formatting and linting unsaved (Untitled) files, as well as your VS Code settings. When you open one of these, the extension will spin up a global Biome instance on demand.

与单文件模式一样,此功能需要 待全局安装 Biome。如果该扩展程序不在你的 PATH 环境变量中,它会通知你。

¥As with single-file mode, this feature requires Biome to be installed globally. The extension will notify you if it’s missing from your PATH.

¥Automatic reload

当扩展程序检测到项目依赖中的 Biome 已更新时,它会自动重新加载相关的 Biome 实例以使用最新版本。

¥When the extension detects that Biome has been updated in your project dependencies, it will automatically reload the relevant Biome instances to use the latest version.

此外,对扩展程序配置的任何更改都会触发 Biome 实例的重新加载,以确保你的新设置立即生效。

¥Additionally, any changes to the extension’s configuration will trigger a reload of the Biome instance to ensure your new settings take effect immediately.

¥Improved status indicator

状态栏现在可以更可靠地反映你当前工作区文件夹中 Biome 的状态。在工作区文件夹之间切换时,指示器会相应更新。

¥The status bar now more reliably reflects the status of Biome for your active workspace folder. When you switch between workspace folders, the indicator updates accordingly.

此外,点击状态指示器即可打开当前 Biome 实例的日志,方便你在进行故障排除时访问日志。

¥Plus, clicking the status indicator opens the logs for the current Biome instance, making it easier to access logs when troubleshooting.

¥Retiring the downloader

最初,下载器的目的是为了弥补将 Biome 安装为项目依赖之前的空白。

¥From the start, the downloader was meant to bridge the gap until you installed Biome as a project dependency.

管理已下载二进制文件的生命周期(包括更新和跨平台支持)非常复杂。我们相信包管理器比我们更能胜任这项工作。

¥Managing the lifecycle of downloaded binaries—including updates and cross-platform support is complex. We believe package managers handle this better than we could.

今后,如果扩展程序需要全局安装 Biome 但找不到,你将看到一条通知,其中包含如何全局安装 Biome 的说明。不用担心,如果你不想收到提醒,可以轻松地关闭此通知。

¥Going forward, if the extension needs a global Biome installation but can’t find it, you’ll see a notification with instructions on how to install Biome globally. And don’t worry, you can easily silence this notification if you prefer not to be reminded.