Skip to content

Conversation

@LoicRiegel
Copy link
Contributor

@LoicRiegel LoicRiegel commented Oct 17, 2025

Summary

Updated Ruff installation instructions for Zed editor.

Details

Ruff support is now built in and does not require installing an extension anymore. zed-industries/zed#37804

Also FYI this open issue is related: zed-industries/zed#40266.

But I've just tried the last code snippet from the docs on a fresh Zed install on Windows and it worked well without installing any extension.

Updated Ruff installation instructions for Zed editor.

Ruff support is now built in and does not require installing an extension anymore. zed-industries/zed#37804

Also FWI this open issue is related: zed-industries/zed#40266.

But I've just tried the last code snippet from the docs on a fresh Zed install on Windows and it worked well without installing any extension.
@MichaReiser
Copy link
Member

Thank you. There's probably more that we can remove, now that ruff is used as the default formatter and linter (it's enabled by default) as mentioned here https://zed.dev/docs/languages/python#code-formatting--linting

@LoicRiegel
Copy link
Contributor Author

I can have a look

@injust
Copy link
Contributor

injust commented Oct 20, 2025

Zed comes with formatting, linting, and organizing imports out-of-the-box now. If you want Ruff to apply fixes when formatting:

{
    "languages": {
        "Python": {
            "code_actions_on_format": { "source.fixAll.ruff": true }
        }
    }
}

@LoicRiegel
Copy link
Contributor Author

I'll do a commit tonight.

Strange that Zed's documentation does not mention the code_actions_on_format anywhere in their python docs. But they have a nice tool to automatically update settings.json settings.
They also mention that the ruff configuration can be read from ruff.toml, but .ruff.toml and pyproject.toml also work (just tested, I wanted to be sure).
Maybe I'll make a small PR on their side too.

BTW do we want do add this in ty's documentation, or is this section https://docs.astral.sh/ty/editors/#other-editors enough?:

{
  "languages": {
    "Python": {
      "language_servers": [
        // Disable basedpyright and enable Ty, and otherwise
        // use the default configuration.
        "ty",
        "!basedpyright",
        "..."
      ]
    }
  }
}

@injust
Copy link
Contributor

injust commented Oct 23, 2025

Strange that Zed's documentation does not mention the code_actions_on_format anywhere in their python docs. But they have a nice tool to automatically update settings.json settings.

code_actions_on_format was slated to be removed from Zed (in favour of code_action), but it broke some uses cases, so it was added back. That might be why.

@MichaReiser
Copy link
Member

BTW do we want do add this in ty's documentation, or is this section docs.astral.sh/ty/editors#other-editors enough?:

Adding Zed to other editors makes sense to me, considering that we have a dedicated tab for Zed on the editor settings page.

I'll do a commit tonight.

Thank you!

@LoicRiegel
Copy link
Contributor Author

Okay tell me what you think. I put back "code_actions_on_format" since this is what has to be used at the moment apparently

@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants