Skip to content

Question: What is the difference between using python-lsp-ruff and using ruff-lsp? #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NeilGirdhar opened this issue Apr 19, 2024 · 7 comments

Comments

@NeilGirdhar
Copy link

I posted here, but just want to crosspost in case you are able to answer it better python-lsp/python-lsp-server#553

@jhossbach
Copy link
Member

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.

@NeilGirdhar
Copy link
Author

Thank you!

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.

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
Copy link
Member

Yes, pyright also allows for renaming etc. In this case I would go for pyright (type checking, goto) + ruff-lsp (linting, formatting)

@NeilGirdhar
Copy link
Author

Thank you!

@Shane-XB-Qian
Copy link
Contributor

Shane-XB-Qian commented Apr 22, 2024 via email

@NeilGirdhar
Copy link
Author

@Shane-XB-Qian I use NeoVim with the language servers: pyright and ruff_lsp.

@CameronNemo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants