Question: What is the difference between using python-lsp-ruff and using ruff-lsp?
NeilGirdhar opened this issue · 7 comments
I posted here, but just want to crosspost in case you are able to answer it better python-lsp/python-lsp-server#553
In short: Under the hood python-lsp-ruff and ruff-lsp do the same thing, namely calling ruff for linting errors and code actions. However python-lsp-server also provides access to other features, such as go-to, object renaming etc, while ruff-lsp can 'only' do what ruff itself provides.
So to answer the question on python-lsp/python-lsp-server#553: While you can have both pylsp-ruff and ruff-lsp running, I would recommend using on or the other. I am also not sure if there is a specification on how editors should handle multiple LSPs so not sure if they could interfere with each other.
Thank you!
python-lsp-serveralso provides access to other features, such as go-to, object renaming etc, whileruff-lspcan 'only' do whatruffitself provides.
The Pyright LSP provides those things as well, right? If I'm using PyRight for renaming and go-to, would I want Ruff as well?
Yes, pyright also allows for renaming etc. In this case I would go for pyright (type checking, goto) + ruff-lsp (linting, formatting)
Thank you!
@Shane-XB-Qian I use NeoVim with the language servers: pyright and ruff_lsp.
I am still using python-lsp-server with this plugin, and for me it works great.
If I switched away from python-lsp-server, though, I'd probably go for jedi-language-server and ruff-lsp.
I haven't gotten too into type checking yet, regrettably. Might need to look into pyright.