feat!: remove --preview
flag from Ruff server (#3241) · neovim/nvim-lspconfig@70d1c2c (original) (raw)
`@@ -8,7 +8,7 @@ local root_files = {
`
8
8
``
9
9
`return {
`
10
10
`default_config = {
`
11
``
`-
cmd = { 'ruff', 'server', '--preview' },
`
``
11
`+
cmd = { 'ruff', 'server' },
`
12
12
`filetypes = { 'python' },
`
13
13
`root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(),
`
14
14
`single_file_support = true,
`
`@@ -18,22 +18,29 @@ return {
`
18
18
`description = [[
`
19
19
`https://github.com/astral-sh/ruff
`
20
20
``
21
``
`-
A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via pip.
`
``
21
`` +
A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via pip
.
``
22
22
``
23
23
```` ```sh
`24`
`24`
`pip install ruff
`
`25`
`25`
```` ```
26
26
``
27
``
`-
Requires Ruff v0.3.3 or later.
`
``
27
`` +
Available in Ruff v0.4.5
in beta and stabilized in Ruff v0.5.3
.
``
28
28
``
29
``
`` -
This is the new Rust-based version of the original ruff-lsp
implementation. It's currently in alpha, meaning that some features are under development. Currently, the following capabilities are supported:
``
``
29
`` +
This is the new built-in language server written in Rust. It supports the same feature set as ruff-lsp
, but with superior performance and no installation required. Note that the ruff-lsp
server will continue to be maintained until further notice.
``
30
30
``
31
``
`-
- Diagnostics
`
32
``
`-
- Code actions
`
33
``
`-
- Formatting
`
34
``
`-
- Range Formatting
`
``
31
`+
Server settings can be provided via:
`
35
32
``
36
``
`` -
Please note that the ruff-lsp
server will continue to be maintained until further notice.
``
``
33
```lua
``
34
`+
require('lspconfig').ruff.setup({
`
``
35
`+
init_options = {
`
``
36
`+
settings = {
`
``
37
`+
-- Server settings should go here
`
``
38
`+
}
`
``
39
`+
}
`
``
40
`+
})
`
``
41
+
``
42
`+
Refer to the documentation for more details.
`
``
43
```
37
44
``
38
45
`]],
`
39
46
`root_dir = [[root_pattern("pyproject.toml", "ruff.toml", ".ruff.toml", ".git")]],
`