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
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<!-- plugins:start (generated by scripts/render-readme.mjs, do not edit) -->

**全部 · 7** | 构建工具 · 3 | 语言支持 · 3 | 版本控制 · 1
**全部 · 9** | 构建工具 · 3 | 工具 · 2 | 语言支持 · 3 | 版本控制 · 1

<table>
<tr>
Expand All @@ -39,21 +39,37 @@
<p><code>build</code> <code>cargo</code> <code>rust</code> <code>testing</code></p>
</td>
<td width="50%" valign="top">
<h3><img src="assets/plugin-default.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-database">Database</a></h3>
<p><sub>Lithe Community · v0.1.1 · API 3(需 backend、serverProcess、ui)</sub></p>
<p>数据库工具窗口:连接 MySQL、MariaDB、PostgreSQL、SQLite、SQL Server、MongoDB、Redis 和 Nacos,提供 SQL 控制台、表数据与结构编辑、CSV/JSON/SQL 导…</p>
<p>🏷️ 工具 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-database?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
<p><code>tool</code> <code>database</code> <code>sql</code> <code>mysql</code> <code>postgresql</code> <code>redis</code></p>
</td>
</tr>
<tr>
<td width="50%" valign="top">
<h3><img src="https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-go/14321930779d1b441e1b7d13d2a4a741ef8f305c/io.github.lithe-idea.go-support/icons/go.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-go">Go Support</a></h3>
<p><sub>Lithe Community · v0.1.0 · API 1</sub></p>
<p>使用你自己安装的 gopls 提供 Go 补全、跳转定义和错误提示,并支持运行 main 包和 go test(整个模块、单个文件所在的包或单个测试函数)。需要先安装 Go 和 gopls(go install gola…</p>
<p>🏷️ 语言支持 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-go?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
<p><code>language</code> <code>go</code></p>
</td>
</tr>
<tr>
<td width="50%" valign="top">
<h3><img src="https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-gradle/88a86cae73403d715d1385e447d8e4a9273e8f2f/io.github.lithe-idea.gradle-build/icons/gradle.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-gradle">Gradle</a></h3>
<p><sub>Lithe Community · v0.1.1 · API 3(需 buildSystems)</sub></p>
<p>预发布 Gradle 集成:项目与任务树、JavaExec 运行入口、筛选测试、编译诊断及依赖树。需要支持 API 3 buildSystems 和原生构建窗口的 Lithe preview 开发版、Gradle 7.6…</p>
<p>🏷️ 构建工具 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-gradle?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
<p><code>build</code> <code>gradle</code> <code>java</code> <code>testing</code></p>
</td>
</tr>
<tr>
<td width="50%" valign="top">
<h3><img src="assets/plugin-default.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-lldb">LLDB Debugger</a></h3>
<p><sub>Lithe Community · v0.1.0 · API 4(需 debugAdapters、languages、serverProcess、settings)</sub></p>
<p>预发布 LLDB 调试器:通过你电脑上的 lldb-dap 调试 C、C++、Objective-C、Swift 和 Rust,支持断点、单步、变量,以及带补全的 lldb 控制台。需要支持插件 API 4 的 Lith…</p>
<p>🏷️ 工具 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-lldb?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
<p><code>tool</code> <code>debug</code> <code>lldb</code> <code>cpp</code> <code>rust</code> <code>swift</code></p>
</td>
<td width="50%" valign="top">
<h3><img src="https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-lua/c5f88bf94e9d5616c7770e58febc53a0d520dd50/io.github.lithe-idea.lua-support/icons/lua.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-lua">Lua Support</a></h3>
<p><sub>Lithe Community · v0.3.0 · API 1</sub></p>
Expand Down
13 changes: 11 additions & 2 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- `pluginAPIVersion: 3` 必须有非空 `requires`,逐项声明包实际使用的能力及其契约版本。
例如只使用声明式构建系统的包为 `"requires": { "buildSystems": 1 }`;不要无故增加
`buildProviders` 等能力。API 1/2 继续使用原有格式,不能带 `requires`。
API 4(调试适配器)同样在 `requires` 里逐项声明,例如 `"debugAdapters": 1`。
- `requires` 的键是小写字母开头、后接英文字母或数字、最长 64 个字符的能力 ID,
值是正整数。索引允许未知能力 ID,由宿主能力表决定可安装性;这不表示当前宿主支持它。
- 包内路径只用 `/`,不能有 `..`、绝对路径或符号链接。
Expand Down Expand Up @@ -117,8 +118,9 @@ shasum -a 256 zig-support-2.0.0-darwin-arm64.zip
```

提高 API 等级或能力版本时发布新的插件版本,并保留最后一个旧要求的版本项,
让旧宿主仍能选择可安装版本。当前 Core 对未来 API 等级(4 及以上)的索引项允许
省略 `requires`,提供时仍校验能力表;这只是索引格式的前向兼容,不承诺宿主可安装。
让旧宿主仍能选择可安装版本。Core 对 API 3 以上的索引项允许省略 `requires`,
提供时仍校验能力表;API 4 的版本项应像 API 3 一样逐项复制包内的 `requires`
(自动追踪就是这样写的),宿主才能据此判断自己是否具备这些能力。

2. 统一格式并本地校验(CI 要求索引使用统一格式:两格缩进,纯值列表写在一行):

Expand Down Expand Up @@ -156,6 +158,13 @@ shasum -a 256 zig-support-2.0.0-darwin-arm64.zip
索引条目并接受相同的校验,不能靠调整追踪策略自动收录。Maven、Gradle 的 `0.1.0`
预发布收录属于这种手工流程,条目是否存在不代表发布或运行验证已经完成。

需要新插件 API 的版本(例如调试适配器插件需要 API 4)要等到稳定版 Lithe 支持该 API 才能让
稳定版用户安装;稳定版是否支持,以 Lithe 的发行说明为准。支持之前,把 GitHub Release 标为
预发布,并手工提交索引条目(LLDB Debugger `0.1.0` 就是这样收录的)。稳定版 Lithe 遇到自己
不支持的 API 等级只会显示“需要更新 Lithe”,不会安装,所以不会装出坏插件。稳定版支持之后,
把 Release 转为正式发布(或发布新版本),自动追踪就会接手后续版本。调试适配器插件的写法见
[编写调试适配器插件](https://github.com/Lithe-IDEA/lithe-plugin-docs/blob/main/guides/debug-adapter-plugin.md)。

自动追踪会在日志中说明归档无法收录的原因:没有符合命名的 zip、包内 `plugin.json`
不匹配或缺失/畸形的能力表、多个资产声明了不同的版本号、API 等级或能力表、
版本号已被别的资产占用。单个发布存在分歧时拒绝整个版本,不只保留其中一个平台包。
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function validateVersionRequirements(version) {
if (version.pluginAPIVersion === 3 && !present) {
throw invalid("pluginAPIVersion 3 must list its capabilities in `requires`");
}
// Core permits future API levels without requires, but validates it when supplied.
// Core permits API levels above 3 without requires, but validates it when supplied.
if (!present) return;
if (!isObject(version.requires) || Object.keys(version.requires).length === 0) {
throw invalid("`requires` must be a non-empty capability object");
Expand Down
Loading