Add deprecation warning for ruff-lsp related settings (#15850)

## 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.
This commit is contained in:
Dhruv Manilawala 2025-02-06 20:12:41 +05:30 committed by GitHub
parent e345307260
commit b66cc94f9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 11 deletions

View file

@ -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

View file

@ -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.
@ -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.
@ -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.
@ -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`).
@ -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.
@ -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"`