You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: What is the difference between using python-lsp-ruff and using ruff-lsp? #89
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.
supposed you meant pylance?
didn't use ruff-lsp but I supposed better idea was enhanced something which let this have better usage experience than that. :sweet_smile:
Activity
jhossbach commentedon Apr 22, 2024
In short: Under the hood
python-lsp-ruffandruff-lspdo the same thing, namely callingrufffor linting errors and code actions. Howeverpython-lsp-serveralso provides access to other features, such as go-to, object renaming etc, whileruff-lspcan 'only' do whatruffitself provides.So to answer the question on python-lsp/python-lsp-server#553: While you can have both
pylsp-ruffandruff-lsprunning, 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.NeilGirdhar commentedon Apr 22, 2024
Thank you!
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?
jhossbach commentedon Apr 22, 2024
Yes, pyright also allows for renaming etc. In this case I would go for
pyright(type checking, goto) +ruff-lsp(linting, formatting)NeilGirdhar commentedon Apr 22, 2024
Thank you!
Shane-XB-Qian commentedon Apr 22, 2024
NeilGirdhar commentedon Apr 23, 2024
@Shane-XB-Qian I use NeoVim with the language servers:
pyrightandruff_lsp.CameronNemo commentedon May 17, 2024
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.