Skip to content

Commit

Permalink
Add deprecation warning for ruff-lsp related settings (#15850)
Browse files Browse the repository at this point in the history
## Summary

This PR updates the documentation to add deprecated warning for
`ruff-lsp` specific settings

### Preview


https://github.com/user-attachments/assets/64e11e4b-7178-43ab-be5b-421e7f4689de

## Test Plan

Build the documentation locally and test out the links. Refer to the
preview video above.
  • Loading branch information
dhruvmanila authored Feb 6, 2025
1 parent e345307 commit b66cc94
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 11 deletions.
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 @@ -882,6 +882,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.

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

Additional arguments to pass to the Ruff formatter.
Expand All @@ -900,6 +906,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 @@ -960,6 +972,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 @@ -978,6 +996,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 @@ -996,6 +1020,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 @@ -1046,6 +1078,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

0 comments on commit b66cc94

Please sign in to comment.