Closed dhruvmanila closed 2 months ago
I'm a bit confused about what the values of the new settings are. The PR summary describes that the values are yes
and no
but the screenshots show off
and on
.
I'm a bit confused about what the values of the new settings are. The PR summary describes that the values are
yes
andno
but the screenshots showoff
andon
.
Sorry, this was copy-pasted from my notes where I initially started off with yes
/no
but a lot of existing VS Code settings use on
/off
so I'm using that. The final values are on
/off
/auto
/true
/false
.
Summary
Superseds #505
This PR updates the
nativeServer
setting with new valueson | off | auto
based on the suggestion at https://github.com/astral-sh/ruff-vscode/pull/505#discussion_r1659606353.For backwards compatibility,
on
andoff
are equivalent totrue
andfalse
respectively.Logic
"on"
/true
"off"
/false
ruff-lsp
"auto"
ruff
version is <0.5.2
ruff-lsp
.ruff
version is ≥0.5.2
ruff-lsp
ruff server
Settings reference:
#### Global Here, the scope represents the following: * "both": setting is supported by both native server and `ruff-lsp` * "new": setting is only supported by the native server * "deprecated": setting is deprecated and isn't supported by the native server * "server deprecated": setting is deprecated only in the native server but it's still accepted and use by the VS Code extension Settings | Scope -- | -- `enable` | both `fixAll` | both `organizeImports` | both `importStrategy` | both `showNotifications` | both `showSyntaxErrors` | both `configuration` | new `configurationPreference` | new `exclude` | new `lineLength` | new `logLevel` | new `logFile` | new `path` | server deprecated `interpreter` | server deprecated `ignoreStandardLibrary` | deprecated #### `codeAction` Settings | Scope -- | -- `disableRuleComment.enable` | both `fixViolation.enable` | both #### `lint` Settings | Scope -- | -- `enable` | both `preview` | new `select` | new `extendSelect` | new `ignore` | new `extendIgnore` | new `args` | deprecated `run` | deprecated #### `format` Settings | Scope -- | -- `preview` | new `args` | deprecatedSettings Preview
Preview of how the description of
nativeServer
setting renders:Auto-completion
Hover on "auto"
Hover on "on"
Hover on "off"
Dropdown
https://github.com/astral-sh/ruff-vscode/assets/67177269/c09bb85c-e82b-4460-8ee5-960d29854389
Test Plan
Native server
on
with a unsupported settingsLogs:
Notification Preview:
Native server
off
with unsupported settingsLogs:
Notification Preview:
Native server "auto" with non-stable version:
Logs:
Native server "auto" with non-stable version and native server settings:
Logs:
Native server "auto" with stable version and using native server settings:
Logs:
Native server "auto" with stable version and using legacy server settings:
Logs:
Native server "auto" with stable version and using both native and legacy server settings:
Logs: