Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .agents/docs/2026-11-21-editor-surfaces-and-feature-matrix.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Editor surfaces and the feature matrix: one rule for every plugin, with Zed and Helix

Status, 2026-11-21: accepted. Stream F (the fixes) is implemented in series 1.6.0; the section
"Stream F as implemented" records where the implementation differs from the plan. Streams S and E (the
surfaces, Zed and Helix) are not implemented and follow in pull requests of their own. The facts about
"Stream F as implemented" records where the implementation differs from the plan. Zed's extension,
its language server part only, is implemented as mcpp-zed 1.7.0 (2026-11-22, #21; section "Zed, as
implemented"). The rest of streams S and E (the surfaces, Zed's tasks and debug locator, Helix) is not
implemented and follows in pull requests of their own. The facts about
this repository were read from `main` (7c411fb) and from mcpp-ide 1.5.0 run over its protocol. The facts about Zed
and Helix come from their documentation and issue trackers and were not run; the section
"Unverified facts" lists them. The facts about mcppls were read from its repository at release
Expand Down Expand Up @@ -361,6 +363,25 @@ in a real Zed in that repository's CI.
`mcpp-ide launch`.
- A context server for Zed's agent is a later addition over the same backend as `agents/`.

### Zed, as implemented (2026-11-22)

mcpp-zed 1.7.0 is the language server part of the plan above, made to the rules of Zed's registry
(zed-industries/extensions) and run in a real Zed 1.29.3 (Linux x86_64, under Xvfb with lavapipe).
Where it differs from the plan, and the facts the run settled:

| Point | As implemented | Why |
|---|---|---|
| Id | `mcpp-ide-language-server`, name `mcpp IDE` | the registry asks an extension that provides only a language server for a `-language-server` or `-lsp` suffix, and an id never changes; `mcpp` is free for an extension that provides more |
| The backend | `lsp.mcpp-ide.binary`, else the bundle of `vX.Y.0` downloaded into the work directory (GitHub, else GitCode's `xlings-res/mcpp-ide`); not PATH | the extension cannot read the series a backend answers, so it could not refuse another series; the plan's PATH first is dropped |
| Where it starts | with any TOML file of a worktree, not only where `mcpp.toml` is at its root | declining was shown in Zed's status bar of every TOML project ("Failed to run mcpp-ide"), and missed projects below the root; the backend reads `mcpp.toml` and `build.mcpp` only |
| Trust | `trusted: true` | Zed starts no language server in a worktree it does not trust ("Waiting for worktree … to be trusted, before starting language server mcpp-ide", Zed.log) |
| `lsp.<server>.binary` | Zed itself starts the named command with the `arguments` given and nothing else, and still asks the extension for the initialization options | measured: a wrapper named without `arguments` was started with none; the README says to include `serve` |
| The series | 1.7.0: `protocol.schema.json` names `zed` among the editors, a backend path, so the extension begins a series | AGENTS.md §7: a change of behaviour updates the protocol schema in the same pull request |
| Tasks, the debug locator, a C++ server for `build.mcpp` | not yet | they follow; mcppls's extension serves C++ |

mcppls's extension was made to the same rules in its repository (Sunrisepeak/mcpp-language-server
#93, `mcppls-language-server`, zed 0.23.1): its payload is downloaded the same way.

### Versions and release

Zed's `extension.toml` becomes a seventh statement of the version, with the tag `zed-vX.Y.Z`. The
Expand Down
8 changes: 6 additions & 2 deletions .agents/skills/mcpp-ide-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ change reaches every plugin, because each plugin is tested over the backend.
| vscode | `mide-plugins/vscode/` | `npm ci && npm test`; `npm run test:parity`, `npm run test:webui`, `npm run test:e2e`; `npm run package` |
| clion | `mide-plugins/clion/` | `gradle test buildPlugin verifyPlugin` |
| nvim | `mide-plugins/nvim/` | `nvim --headless --clean -l mide-plugins/nvim/tests/smoke.lua` |
| zed | `mide-plugins/zed/` | `cargo test`, `cargo build --release --target wasm32-wasip2` (Rust `ZED_RUST_VERSION`), `bash .github/scripts/check-zed-extension.sh mide-plugins/zed` |
| CI | `.github/` | `bash .github/scripts/test_changes.sh`, `bash .github/scripts/release-plan.sh` |

## 3. Common changes
Expand Down Expand Up @@ -64,8 +65,8 @@ change reaches every plugin, because each plugin is tested over the backend.
The rules are in AGENTS.md §4 and [release-plan.sh](../../../.github/scripts/release-plan.sh).

1. Decide the kind. Any backend path changed since `vX.Y.0` means a series release `vX.Y+1.0` (or
`vX+1.0.0`). Otherwise it is a plugin patch, `<vscode|clion|nvim>-vX.Y.Z+1`.
2. On `release/<version>`, bump the version statements (all six for a series, only the plugin's
`vX+1.0.0`). Otherwise it is a plugin patch, `<vscode|clion|nvim|zed>-vX.Y.Z+1`.
2. On `release/<version>`, bump the version statements (all seven for a series, only the plugin's
own for a patch) and add the CHANGELOG.md section under its series, listing each component's
version. Then run `bash .github/scripts/release-plan.sh <tag>`.
3. Open a pull request titled `X.Y.Z: <sentence>` and merge it after `ci` passes.
Expand All @@ -75,3 +76,6 @@ The rules are in AGENTS.md §4 and [release-plan.sh](../../../.github/scripts/re
`JETBRAINS_TOKEN`; Marketplace availability follows JetBrains review.
5. Watch the run until every job passes, then check that the release assets install
(`mcpp-ide self-check` on a project).
6. A release that carries the Zed extension reaches Zed through a pull request to Zed's registry,
which a person opens and answers (its AI policy admits no agent): `mide-plugins/zed/README.md`,
"Zed's extension registry".
1 change: 1 addition & 0 deletions .github/components.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ backend build.mcpp
vscode mide-plugins/vscode/*
clion mide-plugins/clion/*
nvim mide-plugins/nvim/*
zed mide-plugins/zed/*
# What only people read.
docs docs/*
docs agents/*
Expand Down
33 changes: 33 additions & 0 deletions .github/scripts/check-zed-extension.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# check-zed-extension.sh <extension directory> -- what Zed's registry checks of an extension before it
# builds one (zed-industries/extensions: src/lib/validation.js, src/lib/license.js, and the
# publishing prerequisites at zed.dev/docs/extensions/publishing/prerequisites), so that a pull request
# there does not fail on it.
set -euo pipefail
dir="${1:?the extension directory}"
manifest="$dir/extension.toml"
field() { sed -n "s/^$1 = \"\(.*\)\"$/\1/p" "$manifest" | head -1; }
fail() { echo "check-zed-extension: $*" >&2; exit 1; }
id="$(field id)"; name="$(field name)"; version="$(field version)"
[[ "$id" =~ ^[a-z0-9-]+$ ]] || fail "the id '$id' is not lowercase letters, digits and '-'"
case "$id" in zed-*|*-zed|*extension*) fail "the id '$id' starts with zed-, ends with -zed or names 'extension'" ;; esac
case "$name" in "Zed "*|*" Zed") fail "the name '$name' starts or ends with Zed" ;; esac
[[ "${name,,}" != *extension* ]] || fail "the name '$name' names 'extension'"
[[ "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]] || fail "the version '$version' is not X.Y.Z"
grep -qx 'schema_version = 1' "$manifest" || fail "schema_version is not 1"
# An extension that provides a language server and nothing else is named for it.
if ! grep -qE '^\[(grammars|languages)' "$manifest" && ! [ -d "$dir/languages" ] && ! [ -d "$dir/themes" ]; then
case "$id" in *-language-server|*-lsp) ;; *) fail "the id '$id' provides a language server only and ends in neither -language-server nor -lsp" ;; esac
fi
# The license is read in the extension's own directory; the repository's root does not count.
license="$(find "$dir" -maxdepth 1 -type f -iname 'licen[cs]e*' | head -1)"
[ -n "$license" ] || fail "no LICENSE in $dir"
text="$(tr -s '[:space:]' ' ' < "$license")"
for pattern in 'Apache License' 'Version 2.0, January 2004' 'http://www.apache.org/licenses/' \
'TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION' '1. Definitions.' \
'2. Grant of Copyright License.' '3. Grant of Patent License.' '4. Redistribution.' \
'5. Submission of Contributions.' '6. Trademarks.' '7. Disclaimer of Warranty.' \
'8. Limitation of Liability.' '9. Accepting Warranty or Additional Liability.'; do
grep -qiF "$pattern" <<<"$text" || fail "$license is not the Apache 2.0 license the registry accepts (no '$pattern')"
done
echo "check-zed-extension: $id $version ($name): the registry's checks of the manifest and the license pass"
23 changes: 14 additions & 9 deletions .github/scripts/release-plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# of the backend changes every package, and it begins a series. Two kinds of tag:
#
# vX.Y.0 a series release: every component, each at X.Y.0 (a change of the backend)
# <plugin>-vX.Y.Z one editor plugin's patch: vscode, clion or nvim, at X.Y.Z
# <plugin>-vX.Y.Z one editor plugin's patch: vscode, clion, nvim or zed, at X.Y.Z
#
# Prints `components=...`, `version=...` and `title=...` for $GITHUB_OUTPUT. Without a tag it only
# checks that every component states one series, the backend's two statements agree and the backend
Expand All @@ -18,40 +18,45 @@ version[backend]="$(sed -n 's/^version *= *"\(.*\)"/\1/p' "$root/mcpp.toml" | he
version[vscode]="$(sed -n 's/^ "version": "\(.*\)",$/\1/p' "$root/mide-plugins/vscode/package.json" | head -1)"
version[clion]="$(sed -n 's/^pluginVersion *= *\(.*\)$/\1/p' "$root/mide-plugins/clion/gradle.properties" | head -1)"
version[nvim]="$(sed -n "s/^M.version = '\(.*\)'$/\1/p" "$root/mide-plugins/nvim/lua/mcpp/session.lua" | head -1)"
version[zed]="$(sed -n 's/^version = "\(.*\)"$/\1/p' "$root/mide-plugins/zed/extension.toml" | head -1)"
zed_crate="$(sed -n 's/^version = "\(.*\)"$/\1/p' "$root/mide-plugins/zed/Cargo.toml" | head -1)"
zed_lock="$(sed -n '/^name = "zed-mcpp-ide"$/{n;s/^version = "\(.*\)"$/\1/p;}' "$root/mide-plugins/zed/Cargo.lock" | head -1)"
backend_source="$(sed -n 's/^inline constexpr std::string_view kVersion = "\(.*\)";$/\1/p' "$root/src/server.cppm" | head -1)"
series_source="$(sed -n 's/^inline constexpr std::string_view kSeries = "\(.*\)";$/\1/p' "$root/src/server.cppm" | head -1)"
fail() { echo "release-plan: $*" >&2; exit 1; }
series() { [[ "$1" =~ ^([0-9]+)\.([0-9]+)\.[0-9]+$ ]] && echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"; }

for c in backend vscode clion nvim; do
for c in backend vscode clion nvim zed; do
[ -n "${version[$c]}" ] && [ -n "$(series "${version[$c]}")" ] || fail "$c states no X.Y.Z version (${version[$c]:-none})"
done
[ "$zed_crate" = "${version[zed]}" ] || fail "mide-plugins/zed/Cargo.toml says $zed_crate and its extension.toml ${version[zed]}"
[ "$zed_lock" = "${version[zed]}" ] || fail "mide-plugins/zed/Cargo.lock says $zed_lock and its extension.toml ${version[zed]}"
[ "$backend_source" = "${version[backend]}" ] || fail "src/server.cppm says $backend_source and mcpp.toml ${version[backend]}"
the_series="$(series "${version[backend]}")"
[ "${version[backend]}" = "$the_series.0" ] \
|| fail "the backend is ${version[backend]}; it is always its series' X.Y.0 (the editor packages carry it, so a change of it begins a series)"
[ "$series_source" = "$the_series" ] || fail "src/server.cppm's kSeries is $series_source, the backend's series $the_series"
for c in vscode clion nvim; do
for c in vscode clion nvim zed; do
[ "$(series "${version[$c]}")" = "$the_series" ] \
|| fail "$c is ${version[$c]}, of another series than the backend's ${version[backend]}"
done

tag="${1:-}"
if [ -z "$tag" ]; then
echo "one series $the_series: backend ${version[backend]}, vscode ${version[vscode]}, clion ${version[clion]}, nvim ${version[nvim]}"
echo "one series $the_series: backend ${version[backend]}, vscode ${version[vscode]}, clion ${version[clion]}, nvim ${version[nvim]}, zed ${version[zed]}"
exit 0
fi
if [[ "$tag" =~ ^v([0-9]+\.[0-9]+\.0)$ ]]; then
v="${BASH_REMATCH[1]}"
for c in backend vscode clion nvim; do
for c in backend vscode clion nvim zed; do
[ "${version[$c]}" = "$v" ] || fail "the series release $tag needs every component at $v; $c is ${version[$c]}"
done
echo "components=backend vscode clion nvim"
echo "components=backend vscode clion nvim zed"
echo "version=$v"
echo "title=mcpp-ide $v"
elif [[ "$tag" =~ ^backend-v ]]; then
fail "$tag: the backend has no patch of its own; a change of it is a series release vX.Y.0"
elif [[ "$tag" =~ ^(vscode|clion|nvim)-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
elif [[ "$tag" =~ ^(vscode|clion|nvim|zed)-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
c="${BASH_REMATCH[1]}"; v="${BASH_REMATCH[2]}"
[ "${version[$c]}" = "$v" ] || fail "the tag $tag names $c $v, and $c is ${version[$c]}"
# A plugin's patch carries its series' backend: no path of the backend (.github/components.tsv)
Expand All @@ -70,10 +75,10 @@ elif [[ "$tag" =~ ^(vscode|clion|nvim)-v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
done
done < <(git -C "$root" diff --name-only "v$the_series.0" HEAD)
fi
declare -A names=([vscode]=mcpp-vscode [clion]=mcpp-clion [nvim]=mcpp-nvim)
declare -A names=([vscode]=mcpp-vscode [clion]=mcpp-clion [nvim]=mcpp-nvim [zed]=mcpp-zed)
echo "components=$c"
echo "version=$v"
echo "title=${names[$c]} $v"
else
fail "$tag is neither vX.Y.0 nor <vscode|clion|nvim>-vX.Y.Z"
fail "$tag is neither vX.Y.0 nor <vscode|clion|nvim|zed>-vX.Y.Z"
fi
3 changes: 2 additions & 1 deletion .github/scripts/test_changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ check() { # check <description> <event> <expected key=value...> -- <paths...>
check "a plugin alone" pull_request backend=false clion=true vscode=false nvim=false full=false -- mide-plugins/clion/src/main/kotlin/X.kt
check "its README is the plugin's" pull_request vscode=true docs=false backend=false -- mide-plugins/vscode/README.md
check "documentation alone" pull_request docs=true backend=false vscode=false -- docs/x.md README.md
check "the backend reaches every plugin" pull_request backend=true vscode=true clion=true nvim=true -- src/main.cpp
check "the backend reaches every plugin" pull_request backend=true vscode=true clion=true nvim=true zed=true -- src/main.cpp
check "the Zed extension alone" pull_request zed=true backend=false vscode=false clion=false nvim=false full=false -- mide-plugins/zed/src/lib.rs
check "spec/ is the backend's" pull_request backend=true vscode=true -- spec/test-frameworks.json
check "the issue and pull-request forms are documentation" pull_request docs=true backend=false full=false -- .github/ISSUE_TEMPLATE/bug_report.yml .github/pull_request_template.md
check "a skill is documentation" pull_request docs=true backend=false full=false -- .agents/skills/mcpp-ide-development/SKILL.md AGENTS.md
Expand Down
3 changes: 3 additions & 0 deletions .github/versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ XLINGS_VERSION=v2026.10.26.1
VSCODE_VERSION=1.91.0
# The mtest whose report of each `mcpp test` run is the job's summary (.github/actions/mtest-report).
MTEST_VERSION=0.5.2
# The Rust Zed's registry builds extensions with (zed-industries/extensions, ci.yml), which the Zed
# extension's job builds it with.
ZED_RUST_VERSION=1.90
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
vscode: ${{ steps.classify.outputs.vscode }}
clion: ${{ steps.classify.outputs.clion }}
nvim: ${{ steps.classify.outputs.nvim }}
zed: ${{ steps.classify.outputs.zed }}
digest: ${{ steps.classify.outputs.digest }}
lend: ${{ steps.classify.outputs.lend }}
steps:
Expand Down Expand Up @@ -659,6 +660,32 @@ jobs:
with:
plugin_artifact: mcpp-clion-zip

# The Zed extension (mide-plugins/zed): its tests on the host, the crate built for wasm32-wasip2 with
# the Rust Zed's registry builds extensions with (ZED_RUST_VERSION), and what the registry checks of
# the manifest and the license. It needs no backend: it downloads its series' release. Zed's registry
# builds the commit a pull request there names, so nothing is packaged here (its README).
zed:
name: Zed extension
needs: changes
if: needs.changes.outputs.zed == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
defaults:
run:
working-directory: mide-plugins/zed
steps:
- uses: actions/checkout@v5
- name: The Rust of Zed's registry
run: |
set -euo pipefail
version="$(sed -n 's/^ZED_RUST_VERSION=//p' ../../.github/versions.env)"
rustup toolchain install "$version" --profile minimal --target wasm32-wasip2
echo "RUSTUP_TOOLCHAIN=$version" >> "$GITHUB_ENV"
- run: cargo test --locked
- run: cargo build --locked --release --target wasm32-wasip2
- name: What the registry checks of the manifest and the license
run: bash ../../.github/scripts/check-zed-extension.sh .

# The Neovim plugin (mide-plugins/nvim) in a headless Neovim, against the backend built here: over
# the mock mcpp on the oldest and the newest Neovim it supports, then over the real mcpp, which
# builds the test's project. Neovim comes from xlings (`nvim` in xim-pkgindex), each version
Expand Down Expand Up @@ -778,7 +805,7 @@ jobs:
name: ci
if: always()
needs: [changes, checks, versions, matrix, backend, backend-openkal, vscode-gates, vscode-drift, vscode, vscode-e2e,
vscode-isolated-install, vscode-graph-browser, clion, clion-stable, nvim, packages]
vscode-isolated-install, vscode-graph-browser, clion, clion-stable, nvim, zed, packages]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ name: Release
# vscode-vX.Y.Z the VSIX (Open VSX)
# clion-vX.Y.Z the CLion ZIP (JetBrains Marketplace)
# nvim-vX.Y.Z the Neovim plugin: the tag's source archive (xim's mcpp-ide-nvim)
# zed-vX.Y.Z the Zed extension: the tagged commit, which a pull request to Zed's registry
# (zed-industries/extensions) names; the release carries no file of its own
#
# The tag's version must be the component's own, and every component one series.

on:
workflow_dispatch:
push:
tags: ['v*', 'vscode-v*', 'clion-v*', 'nvim-v*']
tags: ['v*', 'vscode-v*', 'clion-v*', 'nvim-v*', 'zed-v*']

permissions:
contents: read
Expand Down Expand Up @@ -83,6 +85,7 @@ jobs:
vscode) cp artifacts/mcpp-vscode-vsix/*.vsix dist/ ;;
clion) cp artifacts/mcpp-clion-zip/*.zip dist/ ;;
nvim) ;; # the tag's source archive is the plugin
zed) ;; # Zed's registry builds the tagged commit
esac
done
notes="$RUNNER_TEMP/notes.md"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mide-plugins/clion/build/
mide-plugins/clion/.gradle/
mide-plugins/clion/.intellijPlatform/
mide-plugins/clion/.kotlin/
mide-plugins/zed/extension.wasm
webui/dist/
*.log
compile_commands.json
Expand Down
Loading
Loading