Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- run: npm run package
- name: Verify VSIX archive
run: unzip -t mcpp-vscode-*.vsix
- name: Verify extension dependency is declared
run: node -e 'const p=require("./package.json"); if (p.extensionDependencies?.[0] !== "sunrisepeak.mcpp-language-server") process.exit(1)'

extension-host-e2e:
runs-on: ubuntu-latest
Expand All @@ -39,3 +41,7 @@ jobs:
- run: npm ci
- name: Run Extension Host smoke tests
run: xvfb-run -a npm run test:e2e
- name: Check packaged extension is not a second language client
run: |
test ! -e dist/src/languageClient.js
! rg -n 'vscode-languageclient|mcppls\.serve' dist/src package.json
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
显式刷新会分别报告 CDB 生成与 clangd 协调结果。
- 对齐 mcpp #387 的最终 workspace 契约:virtual workspace 根不作为单一 clangd 工程,
扩展消费当前活动 member 根的 CDB;rooted workspace 仍按根 package 处理。
## 0.4.0(未发布)

### Changed

- 将 C++ 模块语言服务依赖从官方 `llvm-vs-code-extensions.vscode-clangd` 切换为
`sunrisepeak.mcpp-language-server`(C++ Modules Language Server / mcppls);VS Code 最低版本
提升到 1.91。
- 删除本扩展中的 clangd 解析、匹配、配置、PCM 检查、CDB 监听和自动重启逻辑。mcpp-vscode
不再启动第二个 LSP 客户端,也不再打包语言服务 payload。
- mcpp build 完成后只通过 mcppls 公开命令刷新语言服务;新增模块图、语言服务日志和分析
上下文转发命令。
- 一键模块配置改为一次确认后执行 `mcpp build` 并刷新 mcppls,不再安装 llvm-tools、切换
LLVM 全局默认或修改 clangd 配置。

### Fixed

- 移除 mcpp 已删除的 `[xlings.envs]` manifest 补全,并将 `[xlings.workspace]` 示例版本更新为
当前索引可用的 Node 条目。

## 0.2.7

Expand Down
501 changes: 147 additions & 354 deletions README.md

Large diffs are not rendered by default.

669 changes: 669 additions & 0 deletions docs/superpowers/plans/2026-09-25-mcpp-language-server-migration.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 32 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "mcpp-vscode",
"displayName": "mcpp",
"description": "mcpp 与 C++ 模块的 VS Code 集成",
"version": "0.3.1",
"description": "mcpp 工程构建、工具链与 C++ Modules 语言服务集成",
"version": "0.4.0",
"publisher": "mcpp-community",
"license": "Apache-2.0",
"icon": "images/logo.png",
Expand All @@ -15,16 +15,17 @@
"url": "https://github.com/mcpp-community/mcpp-vscode/issues"
},
"engines": {
"vscode": "^1.90.0"
"vscode": "^1.91.0"
},
"extensionDependencies": [
"llvm-vs-code-extensions.vscode-clangd"
"sunrisepeak.mcpp-language-server"
],
"activationEvents": [
"workspaceContains:mcpp.toml",
"onLanguage:cpp",
"onLanguage:mcpp-build",
"onLanguage:mcpp-toml",
"onCommand:mcpp.configureLanguageServer",
"onCommand:mcpp.configureClangd",
"onCommand:mcpp.refreshCompilationDatabase",
"onCommand:mcpp.checkModuleSupport",
Expand All @@ -37,7 +38,9 @@
"onCommand:mcpp.showToolchains",
"onCommand:mcpp.installToolchain",
"onCommand:mcpp.selectDefaultToolchain",
"onCommand:mcpp.autoConfigureModules"
"onCommand:mcpp.autoConfigureModules",
"onCommand:mcpp.showModuleGraph",
"onCommand:mcpp.showLanguageServerLogs"
],
"categories": [
"Programming Languages",
Expand All @@ -46,7 +49,7 @@
"capabilities": {
"untrustedWorkspaces": {
"supported": "limited",
"description": "未受信任工作区仅启用模块语法高亮与 mcpp.toml 结构补全(纯文本分析),不执行 CDB、mcpp 或 clangd 指定的任何程序,也不接管 clangd 配置。"
"description": "未受信任工作区仅启用本扩展的模块语法高亮与 mcpp.toml 结构补全(纯文本分析),不执行 mcpp CLI 或接管语言服务配置。"
}
},
"main": "./dist/src/extension.js",
Expand Down Expand Up @@ -104,21 +107,33 @@
"command": "mcpp.selectDefaultToolchain",
"title": "mcpp: 选择全局默认工具链"
},
{
"command": "mcpp.configureLanguageServer",
"title": "mcpp: 选择 C++ 模块分析上下文"
},
{
"command": "mcpp.configureClangd",
"title": "mcpp: 配置 clangd"
"title": "mcpp: [已弃用] 配置 C++ 模块语言服务"
},
{
"command": "mcpp.refreshCompilationDatabase",
"title": "mcpp: 刷新编译数据库"
"title": "mcpp: 刷新模块构建描述"
},
{
"command": "mcpp.checkModuleSupport",
"title": "mcpp: 检查模块支持"
"title": "mcpp: 重启 C++ Modules 语言服务"
},
{
"command": "mcpp.autoConfigureModules",
"title": "mcpp: 一键配置模块代码提示"
"title": "mcpp: 一键构建并刷新模块语言服务"
},
{
"command": "mcpp.showModuleGraph",
"title": "mcpp: 查看模块图"
},
{
"command": "mcpp.showLanguageServerLogs",
"title": "mcpp: 打开 C++ Modules 日志"
}
],
"configuration": {
Expand All @@ -134,7 +149,8 @@
"type": "string",
"default": "",
"scope": "resource",
"description": "与 CDB 中 LLVM 编译器来自同一 revision 的 clangd 可执行文件路径;不要求与 mcpp 安装在同一位置。"
"description": "已弃用:C++ 模块语言服务已迁移到 sunrisepeak.mcpp-language-server,此设置不再生效。",
"deprecationMessage": "C++ 模块语言服务已迁移到 sunrisepeak.mcpp-language-server;此设置不再被 mcpp-vscode 使用。"
},
"mcpp.modulesSupport": {
"type": "string",
Expand All @@ -145,13 +161,15 @@
],
"default": "auto",
"scope": "resource",
"description": "控制 clangd 的 C++ 模块实验支持参数。"
"description": "已弃用:C++ 模块语言服务已迁移到 sunrisepeak.mcpp-language-server,此设置不再生效。",
"deprecationMessage": "C++ 模块语言服务已迁移到 sunrisepeak.mcpp-language-server;此设置不再被 mcpp-vscode 使用。"
},
"mcpp.configureCppTools": {
"type": "boolean",
"default": true,
"scope": "resource",
"description": "配置 clangd 时,是否询问关闭 Microsoft C/C++ IntelliSense。"
"description": "已弃用:语言服务冲突现由 sunrisepeak.mcpp-language-server 管理,此设置不再生效。",
"deprecationMessage": "C++ 模块语言服务已迁移到 sunrisepeak.mcpp-language-server;此设置不再被 mcpp-vscode 使用。"
},
"mcpp.tomlCompletion": {
"type": "boolean",
Expand Down Expand Up @@ -224,7 +242,7 @@
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^24.0.0",
"@types/vscode": "^1.90.0",
"@types/vscode": "^1.91.0",
"@vscode/test-electron": "^3.1.0",
"@vscode/vsce": "^3.9.2",
"mocha": "^11.8.0",
Expand Down
Loading
Loading