Santuzius53 downloadsSelect contents in Obsidian and link them into your agent panel in the Zed editor.
Copy a passage, a note, or a folder as a link that Zed's agent panel embeds as context. Paste it there and the contents show up as an attachment rather than a bare link.
That's all. If Zed is installed and its CLI is available, the plugin reaches it automatically. If something goes wrong, see the CLI docs and check the plugin's settings — or skip the CLI and set up your project manually, see below.
Developed and tested on Linux. macOS and Windows should work, and so should a Flatpak Zed by setting Zed command to flatpak run dev.zed.Zed, but none of those are tested.
A Markdown link to the file on disk: a line span for a passage, nothing for a whole note, a trailing slash for a folder.
[@My Note.md (122:123)](file:///home/me/vault/My%20Note.md#L122:123)
[@My Note.md](file:///home/me/vault/My%20Note.md)
[@Projects](file:///home/me/vault/Projects/)
Zed resolves a mention through the open project. A link to something outside it fails with project path not found for file mention. Two ways around that:
| Setting | |
|---|---|
| Use Zed CLI | Hand the target to the Zed CLI before copying. Switches itself on whenever the command answers. |
| Zed command | How to run the CLI: zed, /usr/local/bin/zed, flatpak run dev.zed.Zed, zed.exe. The ▶ button tests it. On macOS, run zed: install cli in Zed once if zed is missing. |
| Open files in | The existing window, the current workspace, or a new window. |
| Jump to the selected line | Put Zed's cursor on the first line of the selection. |
| Open folders in | The current workspace, a new workspace, or a new window. A folder becomes a worktree, so it cannot join the existing window the way a file does. |
| Folder links add | A folder mention needs the folder in the project: the whole vault by default, so one copy is enough for every later link, or just that folder. |
| Remind me about the Zed project | Explain once per session why a link copied without the CLI may not resolve. |
If the command stops answering, the plugin turns Use Zed CLI off and says so. It comes back on by itself once the command answers again; switching it off by hand is remembered.
Desktop only, since the link has to name a real path on disk.
Install from Settings → Community plugins → Browse, or, for a version that is not in the catalogue yet, point BRAT at Santuzius/copy-as-zed-link.
To install by hand, take main.js and manifest.json from the latest release and drop them into <vault>/.obsidian/plugins/copy-as-zed-link/.
MIT