Skip to content

Commit b66cc94

Browse files
authored
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.
1 parent e345307 commit b66cc94

File tree

2 files changed

+49
-11
lines changed

2 files changed

+49
-11
lines changed

docs/editors/migration.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ While `ruff server` supports the same feature set as [`ruff-lsp`](https://github
99
settings are supported by `ruff server`. As such, this migration guide is primarily targeted at editors that lack
1010
explicit documentation for `ruff server` settings, such as Helix or Neovim.
1111

12+
Refer to the [setup guide](setup.md) for instructions on how to configure your editor to use `ruff server`.
13+
1214
## Unsupported Settings
1315

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

16-
- `format.args`
18+
- `lint.run`: This setting is no longer relevant for the native language server, which runs on every
19+
keystroke by default
20+
- `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),
21+
etc. along with the ability to provide a default configuration file using
22+
[`configuration`](settings.md#configuration)
23+
- [`path`](settings.md#path), [`interpreter`](settings.md#interpreter): These settings are no longer
24+
accepted by the language server but are still used by the VS Code extension. Refer to their
25+
respective documentation for more information on how it's being used by the extension.
1726
- `ignoreStandardLibrary`
18-
- `interpreter`
19-
- `lint.args`
20-
- `lint.run`
21-
- `path`
22-
23-
!!! note
24-
25-
Some of these settings, like `interpreter` and `path`, are still accepted by the VS Code
26-
extension. `path`, in particular, can be used to specify a dedicated binary to use when
27-
initializing `ruff server`. But the language server itself will no longer accept such settings.
27+
- `showNotifications`
2828

2929
## New Settings
3030

docs/editors/settings.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,12 @@ Whether to enable the Ruff extension. Modifying this setting requires restarting
882882

883883
### `format.args`
884884

885+
!!! warning "Deprecated"
886+
887+
This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
888+
deprecated in favor of the native language server. Refer to the [migration
889+
guide](migration.md) for more information.
890+
885891
_**This setting is not used by the native language server.**_
886892

887893
Additional arguments to pass to the Ruff formatter.
@@ -900,6 +906,12 @@ Additional arguments to pass to the Ruff formatter.
900906

901907
### `ignoreStandardLibrary`
902908

909+
!!! warning "Deprecated"
910+
911+
This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
912+
deprecated in favor of the native language server. Refer to the [migration
913+
guide](migration.md) for more information.
914+
903915
_**This setting is not used by the native language server.**_
904916

905917
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:
960972

961973
### `lint.args`
962974

975+
!!! warning "Deprecated"
976+
977+
This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
978+
deprecated in favor of the native language server. Refer to the [migration
979+
guide](migration.md) for more information.
980+
963981
_**This setting is not used by the native language server.**_
964982

965983
Additional arguments to pass to the Ruff linter.
@@ -978,6 +996,12 @@ Additional arguments to pass to the Ruff linter.
978996

979997
### `lint.run`
980998

999+
!!! warning "Deprecated"
1000+
1001+
This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
1002+
deprecated in favor of the native language server. Refer to the [migration
1003+
guide](migration.md) for more information.
1004+
9811005
_**This setting is not used by the native language server.**_
9821006

9831007
Run Ruff on every keystroke (`onType`) or on save (`onSave`).
@@ -996,6 +1020,14 @@ Run Ruff on every keystroke (`onType`) or on save (`onSave`).
9961020

9971021
### `nativeServer`
9981022

1023+
!!! warning "Deprecated"
1024+
1025+
This setting has been deprecated with the deprecation of
1026+
[`ruff-lsp`](https://github.com/astral-sh/ruff-lsp). It was mainly used to provide a way to
1027+
switch between the native language server and
1028+
[`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) during the transition period. Refer to the
1029+
[migration guide](migration.md) for more information.
1030+
9991031
Whether to use the native language server, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) or
10001032
automatically decide between the two based on the Ruff version and extension settings.
10011033

@@ -1046,6 +1078,12 @@ The first executable in the list which is exists is used. This setting takes pre
10461078

10471079
### `showNotifications`
10481080

1081+
!!! warning "Deprecated"
1082+
1083+
This setting is only used by [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) which is
1084+
deprecated in favor of the native language server. Refer to the [migration
1085+
guide](migration.md) for more information.
1086+
10491087
Setting to control when a notification is shown.
10501088

10511089
**Default value**: `"off"`

0 commit comments

Comments
 (0)