Skip to content

Commit 70d1c2c

Browse files
authored
feat!: remove --preview flag from Ruff server (#3241)
1 parent df9c116 commit 70d1c2c

File tree

1 file changed

+16
-9
lines changed
  • lua/lspconfig/server_configurations

1 file changed

+16
-9
lines changed

lua/lspconfig/server_configurations/ruff.lua

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local root_files = {
88

99
return {
1010
default_config = {
11-
cmd = { 'ruff', 'server', '--preview' },
11+
cmd = { 'ruff', 'server' },
1212
filetypes = { 'python' },
1313
root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(),
1414
single_file_support = true,
@@ -18,22 +18,29 @@ return {
1818
description = [[
1919
https://github.com/astral-sh/ruff
2020
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`.
2222
2323
```sh
2424
pip install ruff
2525
```
2626
27-
_Requires Ruff v0.3.3 or later._
27+
**Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.**
2828
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.
3030
31-
1. Diagnostics
32-
2. Code actions
33-
3. Formatting
34-
4. Range Formatting
31+
Server settings can be provided via:
3532
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](https://docs.astral.sh/ruff/editors/) for more details.
43+
```
3744
3845
]],
3946
root_dir = [[root_pattern("pyproject.toml", "ruff.toml", ".ruff.toml", ".git")]],

0 commit comments

Comments
 (0)