Skip to content

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

Closed

Description

@NeilGirdhar

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

Activity

  1. jhossbach commented on Apr 22, 2024

    @jhossbach
    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.

  2. NeilGirdhar commented on Apr 22, 2024

    @NeilGirdhar
    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?

  3. jhossbach commented on Apr 22, 2024

    @jhossbach
    Member

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

  4. NeilGirdhar commented on Apr 22, 2024

    @NeilGirdhar
    Author

    Thank you!

  5. Shane-XB-Qian commented on Apr 22, 2024

    @Shane-XB-Qian
    Contributor
  6. NeilGirdhar commented on Apr 23, 2024

    @NeilGirdhar
    Author

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

  7. CameronNemo commented on May 17, 2024

    @CameronNemo

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions