Closed dhruvmanila closed 2 months ago
This PR adds a new showSyntaxErrors server setting for https://github.com/astral-sh/ruff/pull/12059 in ruff-lsp.
showSyntaxErrors
ruff-lsp
Requires: https://github.com/astral-sh/ruff-vscode/pull/504
Verified that the VS Code extension is using the bundled ruff-lsp and the debug build of ruff:
ruff
2024-06-27 08:47:49.567 [info] Server run command: /Users/dhruv/work/astral/ruff-vscode/.venv/bin/python /Users/dhruv/work/astral/ruff-vscode/bundled/tool/server.py 2024-06-27 08:47:49.820 [info] Using 'path' setting: /Users/dhruv/work/astral/ruff/target/debug/ruff 2024-06-27 08:47:49.827 [info] Inferred version 0.4.10 for: /Users/dhruv/work/astral/ruff/target/debug/ruff 2024-06-27 08:47:49.828 [info] Found ruff 0.4.10 at /Users/dhruv/work/astral/ruff/target/debug/ruff
Using the following VS Code config:
{ "ruff.nativeServer": false, "ruff.path": ["/Users/dhruv/work/astral/ruff/target/debug/ruff"], "ruff.showSyntaxErrors": false }
First, set ruff.showSyntaxErrors to true:
ruff.showSyntaxErrors
true
And then set it to false:
false
Using the following Ruff server config:
require('lspconfig').ruff_lsp.setup { cmd = { '/Users/dhruv/work/astral/ruff-lsp/.venv/bin/ruff-lsp' }, init_options = { settings = { path = { '/Users/dhruv/work/astral/ruff/target/debug/ruff' }, showSyntaxErrors = true, }, }, }
First, set showSyntaxErrors to true:
Summary
This PR adds a new
showSyntaxErrors
server setting for https://github.com/astral-sh/ruff/pull/12059 inruff-lsp
.Test Plan
VS Code
Requires: https://github.com/astral-sh/ruff-vscode/pull/504
Verified that the VS Code extension is using the bundled
ruff-lsp
and the debug build ofruff
:Using the following VS Code config:
First, set
ruff.showSyntaxErrors
totrue
:And then set it to
false
:Neovim
Using the following Ruff server config:
First, set
showSyntaxErrors
totrue
:And then set it to
false
: