Repository navigation
feat(widgets): add Zed as an IDE link mode - #800
Merged
Merged
Conversation
Zed registers a zed://file handler that opens files and directories as a workspace, so it belongs with the IDE link modes that Current Working Dir and Git Root Dir already offer. Adding 'zed' to IDE_LINK_MODES extends both widgets at once: the CWD link cycle becomes file -> VS Code -> Cursor -> Zed -> off, and Git Root Dir becomes VS Code -> Cursor -> Zed -> off. Legacy linkToCursor metadata counts as the cursor mode, so its first toggle now lands on zed instead of clearing the link. Tests cover zed:// URLs for POSIX, Windows drive-letter, and UNC paths, both widgets' rendering and editor modifiers, and the TUI link cycle. Docs list Zed in the cycle descriptions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Current Working DirandGit Root Dircan link their text to a file manager, VS Code, or Cursor. This adds Zed to both, using thezed://filehandler Zed registers for opening files and directories as a workspace.lin Current Working Dir now cyclesoff→ file manager → VS Code → Cursor → Zed →off.lin Git Root Dir now cyclesoff→ VS Code → Cursor → Zed →off, and the editor row shows(link-zed).buildIdeFileUrl, so encoding is unchanged on every platform:zed://file/Users/example/project,zed://file/C:/Work/my%20repo,zed://file//server/share/my%20repo.ZedjoinsIDE_LINK_MODES, so both widgets pick it up from one place.Why
Zed's CLI reference documents
zed://,file://andssh://URL handling, andcrates/zed/src/zed/open_listener.rsrouteszed://filethrough the same path parser asfile://. A directory therefore opens as a workspace, so this mode needs no new URL construction, only another option in the existing cycle.Settings
linkTo/linkToIDEhold a mode name, and anything outsideIDE_LINK_MODESstill falls back to no link. A settings file carryingzedopened by an older version keeps its other widgets unchanged and simply does not link; existingcursorsettings are untouched. LegacylinkToCursormetadata is still honored and counts as the cursor mode, so its first toggle now moves to Zed instead of clearing the link.Testing
bun test: 3944 pass, 0 fail (202 files)bun run lint:tsc --noEmitandeslint --max-warnings=0cleanbun run build: succeeds and writesdist/ccstatusline.jszed://URLs for POSIX, Windows drive-letter and UNC paths; Zed rendering and the(link-zed)modifier for both widgets; thelcycle in the CWD editor; the legacylinkToCursormigration targetopen 'zed://file/<directory>'opens that directory as a workspace in Zeddocs/USAGE.mdcycle descriptions updated. README release notes are left to release time.