Skip to content

ruff server vs ty server #204

Open
Open

Description

@tm-michael

The current situation is confusing and it's unclear which LSP to use.

ruff-lsp was deprecated saying ruff server should be used. Now there's ty server which ostensibly duplicates that functionality. It is unclear which one should be used, which one will stay, and which one will go. It is also unclear why ty exists and isn't included in ruff.

Can somebody give some insight?

Activity

  1. MichaReiser commented on Nov 17, 2025

    @MichaReiser
    Member

    Hi @tm-michael

    I'm sorry for the confusion.

    • ruff-lsp is deprecated and shouldn't be used anymore; it's likely going to go away in the near future (we'll archive the project), and we haven't made a new release in a very long time.
    • ruff server provides linting and formatting using ruff. It's the recommended way of using ruff within your editor
    • ty server is the recommended way of using ty in your editor. ty is our in-progress type checker, and its server provides you with go-to-definition, semantic token highlighting, hover, etc. It provides you similar functionality to Pylance

    There's some overlap between ty and ruff in that both tools try to catch errors, but Ruff offers more opinionated lints and helps you make your code more idiomatic, whereas ty focuses on catching hard errors (things that are wrong with very high certainty).

    Long-term, our goal is to either combine ty and ruff into a single tool or have a single extension that allows you to use both. However, this will be a lot of work, and we didn't want to delay shipping a type checker that we expect to be useful to many users today.

    For now, use Ruff for linting and formatting in your editor. Use ty if you want a type checker that allows you to replace Pylance in your editor.

  2. tm-michael commented on Nov 19, 2025

    @tm-michael
    Author

    Thanks for clearing that up @MichaReiser . It might be good to dd a similar blurb to the documentation.

    P.S I asked this in an issue because discussions aren't opened.

  3. seanturner026 commented on Dec 17, 2025

    @seanturner026

    Congrats on the beta release for ty 🎉

    The blog post mentions that ty is also a language server which I think is great but has also brought me here.

    Is there a way to disable the LSP component of ruff so that just ty is used for that? It seems like while there's overlap ty is a better language server whereas ruff is more of a linter / formatter? It looks like it's possible on the ty side of things https://docs.astral.sh/ty/reference/editor-settings/#disablelanguageservices but not really on the ruff side of things?

  4. MichaReiser commented on Dec 17, 2025

    @MichaReiser
    Member

    Ruff only provides formatting and linting, it doesn't have any other LSP functionality that could be disabled.

  5. seanturner026 commented on Dec 17, 2025

    @seanturner026

    Ah. That's confusion on my end. I saw two diagnostics that were similar (but different). Which led me to look at running language servers which listed ruff. Thanks for the super quick response!

  6. MichaReiser commented on Dec 17, 2025

    @MichaReiser
    Member

    Ruff can show diagnostics and you may want to disable syntax errors in ruff to avoid seeing syntax errors twice (once by ruff and once by ty) https://docs.astral.sh/ruff/editors/settings/#showsyntaxerrors

  7. chrisrodrigue commented on Dec 17, 2025

    @chrisrodrigue

    Type checking is a subset of linting so it seems reasonable to assume that there could be overlapping or conflicting settings between ruff and ty.

    ruff vs ty is probably going to be a frequently asked question for devs who want to use all of Astral's tools together. ruff is mentioned in 14/52 (27%) of ty issues so it's a pretty natural comparison.

    @zanieb affirmed in astral-sh/ruff-vscode#835 that they will take a look at unification in the future.

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

    questionAsking for support or clarification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions