Repository navigation
feat: add a Zed extension - #1
Merged
Merged
Conversation
zed/ registers lat-lsp for the languages that carry [[refs]] and @lat: annotations. It starts the lsp.lat-lsp.binary setting, a lat-lsp on PATH, or else npm-installs the server version it was released with and runs it with Zed's Node. Zed extensions cannot watch files themselves, so the server now registers its own **/lat.md/**/*.md watcher when the client supports dynamic registration. The VS Code extension drops its client-side watcher, which would otherwise duplicate it. CI builds the extension for wasm32-wasip2 and fails when the Zed manifests disagree with package.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016cnR4eiZYCMuGyyasRG3ZP
MRocholl
approved these changes
Sep 28, 2026
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
A Zed extension in
zed/, plus the one server change it needs to work well.zed/: registerslat-lspfor Markdown, TypeScript/TSX, JavaScript, Python, Rust, Go, Shell, YAML, Lua, Dart, TOML, SQL, Terraform/HCL and Astro. It starts the first server it finds:lsp.lat-lsp.binarysetting,lat-lspon the worktree'sPATH,zed/Cargo.toml, run with Zed's own Node (the same "no config" setup as the VS Code extension).The server gets the user's shell environment either way, so it finds
rg.Server: registers a
**/lat.md/**/*.mdworkspace/didChangeWatchedFileswatcher inonInitializedwhen the client supports dynamic registration. Zed extensions can't set up watchers themselves, so without this agit switchnever reached the server. Neovim gets the same fix.VS Code: drops the client-side
synchronize.fileEventswatcher, since the server now registers one and the client would otherwise watch the same files twice.CI: a
zedjob runscargo fmt --check, clippy and awasm32-wasip2build. It also fails whenzed/extension.toml/zed/Cargo.tomldisagree withpackage.json, because the extension installs exactly that server version.README: Zed install section, known limitation, updated release checklist.
Installing
It's not in the Zed registry yet. To install from a clone, run
zed: install dev extensionand pickzed/. Zed needs Rust installed throughrustup. Listing it in the registry needs a follow-up PR tozed-industries/extensions.Known limitation
Zed may send go-to-definition only to a language's primary server. In
lat.md/files everything works. In source files, jumping from a// @lat:annotation may come back empty unlesslat-lspis listed first inlanguage_servers. This is documented in the README. It hasn't been checked in a running Zed yet.Testing
npm run typecheck,npm test: 61/61 pass. There are two new tests: one checks the watcher is registered when the client supports dynamic registration, the other that nothing is registered when it doesn't. The first one fails against the old server.cargo fmt --check,cargo clippy -D warnings,cargo build --release --target wasm32-wasip2: clean.lat.md/edit once it's on the new server.Release note
This PR doesn't bump versions. Until the next release, the extensions install server 0.1.3, which doesn't register the watcher. For VS Code that means the removed client watcher only comes back once the extension and server ship together at the next version, which the normal release flow already does. Don't hand-publish the VS Code extension from this commit without bumping.
🤖 Generated with Claude Code
https://claude.ai/code/session_016cnR4eiZYCMuGyyasRG3ZP