aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDhruv Manilawala <dhruvmanila@gmail.com>2024-07-19 11:17:42 +0530
committerGitHub <noreply@github.com>2024-07-19 13:47:42 +0800
commit70d1c2c31a88af4b36019dc1551be16bffb8f9db (patch)
treef738e1a2480a4840bab78f16466c74631f1c6923 /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar.gz
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar.bz2
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar.lz
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar.xz
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.tar.zst
nvim-lspconfig-70d1c2c31a88af4b36019dc1551be16bffb8f9db.zip
feat!: remove `--preview` flag from Ruff server (#3241)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/ruff.lua25
1 files changed, 16 insertions, 9 deletions
diff --git a/lua/lspconfig/server_configurations/ruff.lua b/lua/lspconfig/server_configurations/ruff.lua
index 09a494cc..62e4c7ae 100644
--- a/lua/lspconfig/server_configurations/ruff.lua
+++ b/lua/lspconfig/server_configurations/ruff.lua
@@ -8,7 +8,7 @@ local root_files = {
return {
default_config = {
- cmd = { 'ruff', 'server', '--preview' },
+ cmd = { 'ruff', 'server' },
filetypes = { 'python' },
root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(),
single_file_support = true,
@@ -18,22 +18,29 @@ return {
description = [[
https://github.com/astral-sh/ruff
-A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via pip.
+A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`.
```sh
pip install ruff
```
-_Requires Ruff v0.3.3 or later._
+**Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.**
-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:
+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.
-1. Diagnostics
-2. Code actions
-3. Formatting
-4. Range Formatting
+Server settings can be provided via:
-Please note that the `ruff-lsp` server will continue to be maintained until further notice.
+```lua
+require('lspconfig').ruff.setup({
+ init_options = {
+ settings = {
+ -- Server settings should go here
+ }
+ }
+})
+
+Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details.
+```
]],
root_dir = [[root_pattern("pyproject.toml", "ruff.toml", ".ruff.toml", ".git")]],