Skip to content

Commit cc0f28e

Browse files
0.1.1: mcppls found as the command that starts it; CLion over mcppls 0.0.19's per-system packages; the editor plugins under mide-plugins/, with mcpp-nvim (#2)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 3c2c7b8 commit cc0f28e

92 files changed

Lines changed: 2689 additions & 240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
name: backend
8484
path: backend
8585

86-
# The VS Code extension: unit tests (the wire, the mappings) and the shared panels in a DOM, both
86+
# The VS Code extension (mide-plugins/vscode): unit tests (the wire, the mappings) and the shared panels in a DOM, both
8787
# against the backend built here; the extension in a real VS Code (the oldest it supports) over the
8888
# mock mcpp, with that backend and with the bundle it carries; then the package, and its file list.
8989
vscode:
@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
node-version: 22
103103
cache: npm
104-
cache-dependency-path: vscode/package-lock.json
104+
cache-dependency-path: mide-plugins/vscode/package-lock.json
105105
- uses: actions/download-artifact@v5
106106
with:
107107
name: backend
@@ -115,19 +115,19 @@ jobs:
115115
echo "MCPP_IDE_OKRUN=$GITHUB_WORKSPACE/backend/okrun"
116116
} >> "$GITHUB_ENV"
117117
- name: Install
118-
working-directory: vscode
118+
working-directory: mide-plugins/vscode
119119
run: npm ci
120120
- name: Unit and panel tests
121-
working-directory: vscode
121+
working-directory: mide-plugins/vscode
122122
run: npm test
123123
- name: The panels type-check
124-
working-directory: vscode
124+
working-directory: mide-plugins/vscode
125125
run: npm run check:webui
126126
- name: The extension in VS Code ${{ env.VSCODE_VERSION }}
127-
working-directory: vscode
127+
working-directory: mide-plugins/vscode
128128
run: xvfb-run -a npm run test:e2e
129129
- name: Package
130-
working-directory: vscode
130+
working-directory: mide-plugins/vscode
131131
run: |
132132
npm run package
133133
(cd dist/extension && npx vsce ls --no-dependencies) | tee files.txt
@@ -138,12 +138,13 @@ jobs:
138138
- uses: actions/upload-artifact@v5
139139
with:
140140
name: mcpp-vscode-vsix
141-
path: vscode/dist/*.vsix
141+
path: mide-plugins/vscode/dist/*.vsix
142142

143-
# The CLion plugin: its tests (the wire and a session over the mock mcpp), the archive carrying the
144-
# bundle and every system's okrun, and the Plugin Verifier against the oldest CLion it claims
145-
# (2025.2) and the one it is built on.
146-
jetbrains:
143+
# The CLion plugin (mide-plugins/clion; the protocol's editor `jetbrains`, the IntelliJ platform):
144+
# its tests (the wire and a session over the mock mcpp), the archive carrying the bundle and every
145+
# system's okrun, and the Plugin Verifier against the oldest CLion it claims (2026.1) and the one it
146+
# is built on.
147+
clion:
147148
name: CLion plugin
148149
needs: backend
149150
runs-on: ubuntu-24.04
@@ -159,7 +160,7 @@ jobs:
159160
- uses: actions/cache@v5
160161
with:
161162
path: ~/.gradle/caches/modules-2
162-
key: gradle-clion-${{ hashFiles('jetbrains/gradle.properties', 'jetbrains/build.gradle.kts', 'jetbrains/settings.gradle.kts') }}
163+
key: gradle-clion-${{ hashFiles('mide-plugins/clion/gradle.properties', 'mide-plugins/clion/build.gradle.kts', 'mide-plugins/clion/settings.gradle.kts') }}
163164
- uses: actions/download-artifact@v5
164165
with:
165166
name: backend
@@ -178,13 +179,13 @@ jobs:
178179
echo "MCPP_IDE_OKRUN=$GITHUB_WORKSPACE/backend/okrun"
179180
} >> "$GITHUB_ENV"
180181
- name: Test and package
181-
working-directory: jetbrains
182+
working-directory: mide-plugins/clion
182183
run: gradle --no-daemon test buildPlugin
183184
- name: Plugin Verifier
184-
working-directory: jetbrains
185+
working-directory: mide-plugins/clion
185186
run: gradle --no-daemon verifyPlugin
186187
- name: The archive carries the bundle and every system's okrun
187-
working-directory: jetbrains
188+
working-directory: mide-plugins/clion
188189
run: |
189190
unzip -l build/distributions/mcpp-clion-*.zip | tee files.txt
190191
grep -q "mcpp-clion/backend/mcpp-ide.okb" files.txt
@@ -194,14 +195,62 @@ jobs:
194195
- uses: actions/upload-artifact@v5
195196
with:
196197
name: mcpp-clion-zip
197-
path: jetbrains/build/distributions/*.zip
198+
path: mide-plugins/clion/build/distributions/*.zip
199+
200+
# The Neovim plugin (mide-plugins/nvim) in a headless Neovim, against the backend built here: over
201+
# the mock mcpp on the oldest and the newest Neovim it supports, then over the real mcpp, which
202+
# builds the test's project. Neovim comes from xlings (`nvim` in xim-pkgindex), each version
203+
# installed and selected with `xlings use`, as mcppls's CI provisions it.
204+
nvim:
205+
name: Neovim plugin
206+
runs-on: ubuntu-24.04
207+
timeout-minutes: 45
208+
env:
209+
NVIM_VERSIONS: 0.10.4 0.12.5
210+
defaults:
211+
run:
212+
shell: bash
213+
steps:
214+
- uses: actions/checkout@v5
215+
- uses: ./.github/actions/setup-mcpp
216+
- name: Build the backend and the mock mcpp
217+
run: mcpp build
218+
- name: Neovim from xlings
219+
run: |
220+
set -euo pipefail
221+
for version in $NVIM_VERSIONS; do
222+
for attempt in 1 2 3; do
223+
if xlings install "nvim@$version" -y -g; then break; fi
224+
[ "$attempt" = 3 ] && { echo "::error::nvim@$version could not be installed"; exit 1; }
225+
sleep 30
226+
done
227+
done
228+
# Neovim runs outside the repository: inside it, xlings resolves tools through the project's
229+
# own subos (.xlings.json), which holds mcpp only. The suite finds the backend by its own path.
230+
- name: The plugin on each Neovim, over the mock mcpp
231+
working-directory: ${{ runner.temp }}
232+
run: |
233+
set -euo pipefail
234+
failed=''
235+
for version in $NVIM_VERSIONS; do
236+
xlings use nvim "$version"
237+
nvim --version | head -1 | tee said.txt
238+
grep -qF "v$version" said.txt
239+
echo "::group::Neovim $version"
240+
nvim --headless --clean -l "$GITHUB_WORKSPACE/mide-plugins/nvim/tests/smoke.lua" || failed="$failed $version"
241+
echo "::endgroup::"
242+
done
243+
if [ -n "$failed" ]; then echo "::error::the Neovim plugin failed on:$failed"; exit 1; fi
244+
- name: The plugin over the real mcpp
245+
working-directory: ${{ runner.temp }}
246+
run: MCPP_NVIM_MCPP="$(command -v mcpp)" nvim --headless --clean -l "$GITHUB_WORKSPACE/mide-plugins/nvim/tests/smoke.lua"
198247

199248
# The packages, opened on every system they serve: the one bundle each editor package carries,
200249
# started by the okrun it carries for that system (scripts/check-package.sh), and the backend's own
201250
# universal package started by its launcher.
202251
packages:
203252
name: packages on ${{ matrix.os }}
204-
needs: [vscode, jetbrains]
253+
needs: [vscode, clion]
205254
runs-on: ${{ matrix.os }}
206255
timeout-minutes: 15
207256
strategy:

‎.gitignore‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
target/
22
.mcpp/
33
node_modules/
4-
vscode/dist/
5-
vscode/out/
6-
vscode/*.vsix
7-
vscode/bin/
8-
jetbrains/build/
9-
jetbrains/.gradle/
10-
jetbrains/.intellijPlatform/
4+
mide-plugins/vscode/dist/
5+
mide-plugins/vscode/out/
6+
mide-plugins/vscode/*.vsix
7+
mide-plugins/vscode/bin/
8+
mide-plugins/clion/build/
9+
mide-plugins/clion/.gradle/
10+
mide-plugins/clion/.intellijPlatform/
11+
mide-plugins/clion/.kotlin/
1112
webui/dist/
1213
*.log
1314
compile_commands.json
1415
dist-upload/
15-
jetbrains/.kotlin/
1616
.xlings/

‎CHANGELOG.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Changelog
22

3+
## 0.1.1
4+
5+
mcpp-vscode 1.0.1, mcpp-clion 0.1.1 and the first mcpp-nvim (0.1.1), with mcppls 0.0.19.
6+
7+
- **mcppls is found as the command that starts it.** mcppls 0.0.18 and later carry the server as an
8+
okb that the platform's runner starts (`payload.json`'s `server`: `bin/okrun bin/mcppls.okb`). The
9+
backend ran the okb itself for `--version`, so the VS Code extension's mcppls was reported as not
10+
reporting its version (`permission denied`), and the payload in the user data directory was looked
11+
for as `bin/mcppls`. A candidate is now a payload directory, whose `server` is started as it says,
12+
or a program; `languageService/status` reports the `command` beside the `program`. What
13+
`server` names is followed only inside the payload (a relative path with no `..` part), as mcppls
14+
reads it.
15+
- **VS Code**: the candidate is the mcppls extension's payload directory (`MCPPLS_PAYLOAD`, else
16+
`<extension>/payload`), and `MCPPLS_SERVER`.
17+
- **CLion**: the candidate is the payload the mcppls CLion plugin carries (mcppls 0.0.19 ships one
18+
package per system, each with its server), with its runner made executable again when the
19+
plugin's install dropped the bit, and `MCPPLS_SERVER`. *Install mcppls* and *Update
20+
mcppls* open Settings | Plugins, where the Marketplace gives this system's package.
21+
- **CLion 2026.1 and later** (since-build 261), as the mcppls plugin mcpp-clion depends on; the
22+
Plugin Verifier checks 2026.1 and 2026.2.3, and the build loads this machine's mcppls 0.0.19
23+
package.
24+
- **The editor plugins are `mide-plugins/`**: `mide-plugins/vscode` (mcpp-vscode),
25+
`mide-plugins/clion` (mcpp-clion; the protocol's editor id stays `jetbrains`, the IntelliJ
26+
platform's) and `mide-plugins/nvim` (mcpp-nvim). The backend, the panels, `spec/`, `protocol/` and
27+
the tests stay at the root; both earlier adapters build and test as before.
28+
- **mcpp-nvim, mcpp's project features in Neovim 0.10 and later**, over the same backend through
29+
Neovim's own JSON-RPC client: `:Mcpp <subcommand>` with completion, from the backend's command
30+
table for the editor `nvim`; builds, tests, cleanups and packs as jobs streamed into
31+
`mcpp://output`, cancelled with `:Mcpp cancel`; the program in a terminal buffer; debugging through
32+
nvim-dap when it is present; targets, toolchains, new projects and libraries through
33+
`vim.ui.select` and `vim.ui.input`; targets and platforms, the cache and the graphs as text in
34+
floating windows; mcpp's diagnostics in the namespaces `mcpp` and `mcpp.toml`, and
35+
`:Mcpp problems` in the quickfix list; `require('mcpp').status()` for the statusline. It registers
36+
no language service: mcppls comes with mcppls-nvim (`xlings install mcppls-nvim`), which the plugin
37+
names when mcppls is missing or older. The backend is `mcpp-ide` on PATH
38+
(`xlings install mcpp-ide`) or setup()'s `backend`; `xlings install mcpp-ide-nvim` installs the
39+
plugin with the backend and sets it up at Neovim's start (`vim.g.mcpp_auto_start = false` opts
40+
out). A backend that ends is said; the requests and jobs waiting on it fail, and the next command
41+
starts another, which watches the same projects. A headless suite runs it against the backend on
42+
Neovim 0.10.4 and 0.12.5, over the mock mcpp and over the real one.
43+
- **The protocol's editor `nvim`**, and each row of `commands/list` names its `subcommand` (the id
44+
after `mcpp.`, or the row's own: `mcpp.cancelJob` is `cancel`). `spec/commands.json` says why an
45+
editor is left out of a row (`omitted`); Neovim's table has `mcpp.problems` (the action `problems`)
46+
and the quick menu, and leaves out the settings panel and the panels' entry pages. Which rows an
47+
editor offers is one function, shared by the backend and `mcpp-ide-dev gen`.
48+
- **The cache inventory's rows carry their size as text** (`bytesText`), for an editor that shows it
49+
as text.
50+
351
## 0.1.0
452

553
The first release of mcpp-ide: one backend for mcpp's editor integrations, the VS Code extension

‎README.md‎

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mcpp-ide - the IDE layer of mcpp
22

33
> One backend for every editor of [mcpp](https://github.com/mcpp-community/mcpp) projects: VS Code
4-
> (mcpp-vscode) and CLion (mcpp-clion) build, run, test, debug and pack alike
4+
> (mcpp-vscode), CLion (mcpp-clion) and Neovim (mcpp-nvim) build, run, test, debug and pack alike
55
66
**English** | [简体中文](README.zh-CN.md)
77

@@ -16,20 +16,22 @@ different tool.
1616
mcpp-ide makes them once. Its backend, `mcpp-ide serve`, is a C++ program that reads only mcpp's
1717
machine contract (event streams, result records, launch descriptors, JSON queries) and answers the
1818
editors over JSON-RPC. The VS Code extension and the CLion plugin map those answers onto their own
19-
UI and share one set of web panels. Language features of C++ files come from
20-
[mcppls](https://github.com/Sunrisepeak/mcpp-language-server); mcpp-ide registers none.
19+
UI and share one set of web panels; the Neovim plugin maps them onto buffers, floating windows and
20+
the quickfix list. The editor plugins are `mide-plugins/` of this repository. Language features of
21+
C++ files come from [mcppls](https://github.com/Sunrisepeak/mcpp-language-server); mcpp-ide
22+
registers none.
2123

2224
## Features
2325

24-
| | VS Code (mcpp-vscode) | CLion (mcpp-clion) |
25-
|---|---|---|
26-
| Build, run, test | Tasks in a pseudoterminal showing mcpp's output | "mcpp" run configurations, PTY console, ▶ beside `main` |
27-
| Test tree, re-run one test | Testing view | IDE test runner |
28-
| Debug | CodeLLDB, C/C++ (gdb, lldb), lldb-dap | CLion's GDB or LLDB |
29-
| Diagnostics | Problems, from mcpp's located diagnostics | Console links to the reported location |
30-
| mcpp.toml | Problems from mcpp; completion, hover, outline from mcpp's key registry | Problems from mcpp |
31-
| Targets and platforms, libraries, graphs, cache, pack, settings | Shared web panels | The same panels (JCEF) |
32-
| Language features | mcppls (installed with the extension) | mcppls CLion plugin (a dependency) |
26+
| | VS Code (mcpp-vscode) | CLion (mcpp-clion) | Neovim (mcpp-nvim) |
27+
|---|---|---|---|
28+
| Build, run, test | Tasks in a pseudoterminal showing mcpp's output | "mcpp" run configurations, PTY console, ▶ beside `main` | `:Mcpp build`, `test`: jobs streamed into a buffer; `:Mcpp run` in a terminal buffer |
29+
| Test tree, re-run one test | Testing view | IDE test runner | `:Mcpp test <filter>` |
30+
| Debug | CodeLLDB, C/C++ (gdb, lldb), lldb-dap | CLion's GDB or LLDB | nvim-dap (codelldb, lldb-dap, cppdbg, gdb) |
31+
| Diagnostics | Problems, from mcpp's located diagnostics | Console links to the reported location | `vim.diagnostic`, `:Mcpp problems` in the quickfix list |
32+
| mcpp.toml | Problems from mcpp; completion, hover, outline from mcpp's key registry | Problems from mcpp | Problems from mcpp |
33+
| Targets and platforms, libraries, graphs, cache, pack, settings | Shared web panels | The same panels (JCEF) | Text in floating windows, `vim.ui.select`; settings in `setup()` |
34+
| Language features | mcppls (installed with the extension) | mcppls CLion plugin (a dependency) | mcppls-nvim (`xlings install mcppls-nvim`) |
3335

3436
- **One answer everywhere** -- what a build runs, how a test is reported, what a cleanup costs: the backend's
3537
- **Only mcpp's contract** -- no manifest parsing, no dependency resolution of its own
@@ -43,8 +45,8 @@ UI and share one set of web panels. Language features of C++ files come from
4345

4446
```
4547
Read agents/README.md of https://github.com/mcpp-community/mcpp-ide, then install mcpp-ide for
46-
the editor I use (VS Code or CLion) from its latest release, and check it with `mcpp-ide self-check`
47-
on my mcpp project.
48+
the editor I use (VS Code, CLion or Neovim) from its latest release, and check it with
49+
`mcpp-ide self-check` on my mcpp project.
4850
```
4951

5052
### From a release
@@ -53,21 +55,24 @@ on my mcpp project.
5355
|---|---|---|
5456
| VS Code | the Marketplace (`mcpp-community.mcpp-vscode`), or `mcpp-vscode-<version>.vsix` | search *mcpp*, or `code --install-extension mcpp-vscode-<version>.vsix` |
5557
| VS Code-compatible editors | Open VSX, or the `.vsix` | install the `.vsix` from the extensions view |
56-
| CLion 2025.2+ | JetBrains Marketplace (`mcpp-clion`), or `mcpp-clion-<version>.zip` | Settings → Plugins → Install Plugin from Disk; the mcppls CLion plugin first |
58+
| CLion 2026.1+ | JetBrains Marketplace (`mcpp-clion`), or `mcpp-clion-<version>.zip` | Settings → Plugins → Install Plugin from Disk; the mcppls CLion plugin (its package for this system carries the server) first |
59+
| Neovim 0.10+ | `mide-plugins/nvim` of the release's source tree | `xlings install mcpp-ide-nvim` (the backend with it, set up at start); or the directory on the runtimepath and `require('mcpp').setup()` ([its README](mide-plugins/nvim/README.md)) |
5760
| Agents, other clients | `mcpp-ide-<version>-openkal.tar.gz` (both images; okrun for Linux x64/arm64, macOS arm64, Windows x64), `mcpp-ide-<version>.okb` with okrun, or `xlings install mcpp-ide` | run `bin/mcpp-ide serve` (`bin\mcpp-ide.cmd` on Windows), or `okrun mcpp-ide-<version>.okb serve` |
5861

5962
Each editor package serves every system: it carries the backend as one ok-image bundle
6063
(`backend/mcpp-ide.okb`, the x86_64 and aarch64 images on openkal-platform 0.17.3) and okrun for
61-
Linux x64/arm64, macOS arm64 and Windows x64.
64+
Linux x64/arm64, macOS arm64 and Windows x64. The Neovim plugin carries none: it starts the
65+
`mcpp-ide` command xlings installs (okrun on the same bundle).
6266

6367
### From source
6468

6569
```bash
66-
mcpp build # the backend, the mock mcpp, mcpp-ide-dev
67-
mcpp test # the backend's tests
68-
cd vscode && npm ci && npm test # the extension's and the panels' tests
69-
npm run package # dist/mcpp-vscode-<version>.vsix
70-
cd ../jetbrains && gradle buildPlugin verifyPlugin # build/distributions/mcpp-clion-<version>.zip
70+
mcpp build # the backend, the mock mcpp, mcpp-ide-dev
71+
mcpp test # the backend's tests
72+
cd mide-plugins/vscode && npm ci && npm test # the extension's and the panels' tests
73+
npm run package # dist/mcpp-vscode-<version>.vsix
74+
cd ../clion && gradle buildPlugin verifyPlugin # build/distributions/mcpp-clion-<version>.zip
75+
cd ../.. && nvim --headless --clean -l mide-plugins/nvim/tests/smoke.lua # the Neovim plugin's tests
7176
```
7277

7378
`xlings install gradle` brings Gradle and its JDK.
@@ -77,8 +82,10 @@ cd ../jetbrains && gradle buildPlugin verifyPlugin # build/distributions/mcpp-
7782
- [docs/architecture.md](docs/architecture.md) -- the three layers and their boundaries
7883
- [protocol/protocol.schema.json](protocol/protocol.schema.json) -- the backend's methods and notifications
7984
- [protocol/mcpp-contract.schema.json](protocol/mcpp-contract.schema.json) -- the part of mcpp's contract it reads
80-
- [spec/](spec) -- settings, commands, translations: the source of both editors' declarations
81-
- [vscode/README.md](vscode/README.md), [jetbrains/README.md](jetbrains/README.md)
85+
- [spec/](spec) -- settings, commands, translations: the source of the editors' declarations and command tables
86+
- [mide-plugins/vscode/README.md](mide-plugins/vscode/README.md),
87+
[mide-plugins/clion/README.md](mide-plugins/clion/README.md),
88+
[mide-plugins/nvim/README.md](mide-plugins/nvim/README.md)
8289

8390
## Contributing
8491

0 commit comments

Comments
 (0)