Skip to content

docs: Update the Zed editor integration#3017

Merged
MichaReiser merged 2 commits intoastral-sh:mainfrom
lingyaochu:main
Mar 13, 2026
Merged

docs: Update the Zed editor integration#3017
MichaReiser merged 2 commits intoastral-sh:mainfrom
lingyaochu:main

Conversation

@lingyaochu
Copy link
Copy Markdown
Contributor

Summary

According to the PR zed-industries/zed#50662, the LSP adapters registry logic has been updated, and the corresponding documentation in Zed has changed as well.

This PR syncs the ty side to align with these changes.

Test Plan

No test needed.

Comment thread docs/editors.md
// Disable basedpyright and enable ty
"ty",
"!basedpyright",
"..."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you say more about why you removed .... Should we rephrase the comment instead of removing all other language servers (so that the documentation matches Zed's documentation in https://github.com/zed-industries/zed/pull/50662/changes)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the "..." because while its underlying logic (enabling all remaining registered adapters) hasn't changed, Zed's registry behavior has. Previously, adapters like pylsp and pyright and ty were lazy-loaded and didn't appear in the registry unless explicitly invoked. Because of this, a configuration like ["ty", "!basedpyright", "..."] would coincidentally only enable ruff, making the old documentation’s claim that ... meant "keep defaults" appear correct in practice.

However, after the registry logic change in zed-industries/zed#50662, all five Python adapters are now registered upfront. This means keeping the ellipsis would now result in an effective configuration of ["ty", "!basedpyright", "ruff", "pylsp", "pyright"], spawning redundant language servers that users don't actually want. While Zed’s own documentation might retain the "..." to explain the feature's mechanics, I believe our documentation for ty should prioritize providing a clean, "copy-pasteable" configuration. By removing the ellipsis, we ensure that users get exactly what they expect—ty enabled and basedpyright disabled—without any unintended side effects or performance overhead from extra LSPs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case I wasn't clear, here's an example from the main Zed docs that should give you a better idea of what I mean about the "..."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the "..." because while its underlying logic (enabling all remaining registered adapters) hasn't changed, Zed's registry behavior has. Previously, adapters like pylsp and pyright and ty were lazy-loaded and didn't appear in the registry unless explicitly invoked. Because of this, a configuration like ["ty", "!basedpyright", "..."] would coincidentally only enable ruff, making the old documentation’s claim that ... meant "keep defaults" appear correct in practice.

However, after the registry logic change in zed-industries/zed#50662, all five Python adapters are now registered upfront. This means keeping the ellipsis would now result in an effective configuration of ["ty", "!basedpyright", "ruff", "pylsp", "pyright"], spawning redundant language servers that users don't actually want. While Zed’s own documentation might retain the "..." to explain the feature's mechanics, I believe our documentation for ty should prioritize providing a clean, "copy-pasteable" configuration. By removing the ellipsis, we ensure that users get exactly what they expect—ty enabled and basedpyright disabled—without any unintended side effects or performance overhead from extra LSPs.

Thank you for explaining this! Finally I understand why the behaviour of "..." changed recently.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you say more about why you removed .... Should we rephrase the comment instead of removing all other language servers (so that the documentation matches Zed's documentation in https://github.com/zed-industries/zed/pull/50662/changes)

Note that https://github.com/zed-industries/zed/pull/51427/changes was just merged, which makes Zed's docs on "..." more clear that it enables all other languages servers.

@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label Mar 11, 2026
@lingyaochu lingyaochu requested a review from MichaReiser March 12, 2026 10:08
@injust
Copy link
Copy Markdown

injust commented Mar 13, 2026

Oh nice, I was just about the make a PR for this change. See zed-industries/zed#51416 for more context.

I wonder if ty's example config should also include "ruff", since users are probably interested in using it along with ty. If you just remove the "...", then Ruff would stop working.

Comment thread docs/editors.md Outdated
// use the default configuration.
// Disable basedpyright and enable ty
"ty",
"!basedpyright",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If removing "...", then also remove !basedpyright entirely. There's really no point in leaving it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right. I had a misunderstanding of how the configuration merges: I previously thought that servers not explicitly mentioned would still follow the default settings, which is why I didn't include "ruff" and thought I needed "!basedpyright".

Since I actually want to keep "ruff" enabled alongside "ty", I should explicitly list both and remove the unnecessary "!basedpyright" entry. I'll update the PR after some manual testing. Thanks for pointing this out!

Copy link
Copy Markdown
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the links and more detailed explanation. What we have here makes sense to me. We might want to revisit the configuration if Zed starts to support more Python LSPs that are commonly used alongside ty and ruff, but for now, this is a good start.

@MichaReiser MichaReiser enabled auto-merge (squash) March 13, 2026 08:29
@MichaReiser MichaReiser merged commit 26a6e34 into astral-sh:main Mar 13, 2026
13 checks passed
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