Open rassie opened 1 month ago
This is now available in beta: https://github.com/astral-sh/ruff/tree/main/crates/ruff_server#setup
Here's the blogpost about it: https://astral.sh/blog/ruff-v0.4.5
A very basic version that seems to be working for me:
(with-eval-after-load 'lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("ruff" "server" "--preview"))
:major-modes '(python-mode)
:priority 1
:add-on? t
:multi-root t
:server-id 'ruff-server)
)
)
(setq! lsp-disabled-clients '(python-mode . (ruff-lsp)))
According to https://github.com/astral-sh/ruff/pull/10158,
ruff server
is a re-implementation ofruff-lsp
in Rust and just by that property it is very probable thatruff-lsp
will be deprecated in near future. Would be nice to have alsp-mode
client forruff server
by that point.