ruff-lsp is the Language Server Protocol implementation for Ruff to power the editor
integrations. It is written in Python and is a separate package from Ruff itself. The native
server, however, is the Language Server Protocol implementation which is written in Rust and
is available under the ruff server command. This guide is intended to help users migrate from
ruff-lsp to the native server.
Note
The native server was first introduced in Ruff version 0.3.5. It was marked as beta in
version 0.4.5 and officially stabilized in version
0.5.3. It is recommended to use the
latest version of Ruff to ensure the best experience.
The migration process involves any or all of the following:
Read on to learn more about the unsupported or new settings, or jump to the examples
that enumerate some of the common settings and how to migrate them.
The following settings are not accepted by the language server but are still used by the VS Code extension.
Refer to their respective documentation for more information on how each is used by the extension:
All of the examples mentioned below are only valid for the VS Code extension. For other editors,
please refer to their respective documentation sections in the settings page.
You can migrate to the new server by using the configuration setting
like below which will apply the configuration to both the linter and the formatter: