Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation warning for ruff-lsp related settings #15850

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docs/editors/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ While `ruff server` supports the same feature set as [`ruff-lsp`](https://github
settings are supported by `ruff server`. As such, this migration guide is primarily targeted at editors that lack
explicit documentation for `ruff server` settings, such as Helix or Neovim.

Refer to the [setup guide](setup.md) for instructions on how to configure your editor to use `ruff server`.

## Unsupported Settings

Several `ruff-lsp` settings are not supported by `ruff server`. These are, as follows:

- `format.args`
- `lint.run`: This setting is no longer relevant for the native language server, which runs on every
keystroke by default
- `lint.args`, `format.args`: These settings have been replaced by more granular settings in `ruff server` like [`lint.select`](settings.md#select), [`format.preview`](settings.md#format_preview),
etc. along with the ability to provide a default configuration file using
[`configuration`](settings.md#configuration)
- [`path`](settings.md#path), [`interpreter`](settings.md#interpreter): These settings are no longer
accepted by the language server but are still used by the VS Code extension. Refer to their
respective documentation for more information on how it's being used by the extension.
- `ignoreStandardLibrary`
- `interpreter`
- `lint.args`
- `lint.run`
- `path`

!!! note

Some of these settings, like `interpreter` and `path`, are still accepted by the VS Code
extension. `path`, in particular, can be used to specify a dedicated binary to use when
initializing `ruff server`. But the language server itself will no longer accept such settings.
- `showNotifications`

## New Settings

Expand Down
38 changes: 38 additions & 0 deletions docs/editors/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,12 @@ Whether to enable the Ruff extension. Modifying this setting requires restarting

### `format.args`

!!! warning "Deprecated"

This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
deprecated in favor of the native language server. Refer to the [migration
guide](migration.md) for more information.

MichaReiser marked this conversation as resolved.
Show resolved Hide resolved
_**This setting is not used by the native language server.**_

Additional arguments to pass to the Ruff formatter.
Expand All @@ -950,6 +956,12 @@ Additional arguments to pass to the Ruff formatter.

### `ignoreStandardLibrary`

!!! warning "Deprecated"

This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
deprecated in favor of the native language server. Refer to the [migration
guide](migration.md) for more information.

_**This setting is not used by the native language server.**_

Whether to ignore files that are inferred to be part of the Python standard library.
Expand Down Expand Up @@ -1010,6 +1022,12 @@ This setting depends on the [`ruff.nativeServer`](#nativeserver) setting:

### `lint.args`

!!! warning "Deprecated"

This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
deprecated in favor of the native language server. Refer to the [migration
guide](migration.md) for more information.

_**This setting is not used by the native language server.**_

Additional arguments to pass to the Ruff linter.
Expand All @@ -1028,6 +1046,12 @@ Additional arguments to pass to the Ruff linter.

### `lint.run`

!!! warning "Deprecated"

This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
deprecated in favor of the native language server. Refer to the [migration
guide](migration.md) for more information.

_**This setting is not used by the native language server.**_

Run Ruff on every keystroke (`onType`) or on save (`onSave`).
Expand All @@ -1046,6 +1070,14 @@ Run Ruff on every keystroke (`onType`) or on save (`onSave`).

### `nativeServer`

!!! warning "Deprecated"

This setting has been deprecated with the deprecation of
[`ruff-lsp`](https://github.com/astral-sh/ruff-lsp). It was mainly used to provide a way to
switch between the native language server and
[`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) during the transition period. Refer to the
[migration guide](migration.md) for more information.

Whether to use the native language server, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) or
automatically decide between the two based on the Ruff version and extension settings.

Expand Down Expand Up @@ -1096,6 +1128,12 @@ The first executable in the list which is exists is used. This setting takes pre

### `showNotifications`

!!! warning "Deprecated"

This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
deprecated in favor of the native language server. Refer to the [migration
guide](migration.md) for more information.

Setting to control when a notification is shown.

**Default value**: `"off"`
Expand Down