Repository navigation
feat(plugins): 同一语言只由一个已启用的插件提供语言服务器 - #39
Merged
Merged
Conversation
plugins.installed.lifecycle 的已安装版本可带 languageServers(清单声明的语言服务器 languageID)。启用插件、或确认安装后插件处于启用状态时,其他已启用且最新版本为同一语言 声明语言服务器的插件,各得到一个 displacePlugin 步骤:宿主记为停用、停掉进程并告诉用户。 规则之前已同时启用的两个插件,启用状态按 ID 只保留第一个,选择不改,等用户启用其中一个时 再定下来;停用不会顶替别的插件。 契约 README、开发指南和 rust-core-api 写明该规则,共享 fixture 覆盖启用、安装、更新、 只看最新版本、旧状态和停用。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1lck
marked this pull request as ready for review
November 14, 2026 08:50
This was referenced Nov 14, 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.
关联
java声明语言服务器。两个都启用时,Viva 宿主按插件列表顺序静默取第一个,另一个形同失效;Java Navigation 的 README 只能写“暂时不要同时启用”。改了什么
plugins.installed.lifecycle的installed[]新增可选languageServers:该版本清单里每个语言服务器的languageID,最多 256 个、非空、不重复,否则invalid_request。major.minor.patch比较,解析不了的版本排在最后),与宿主运行哪个版本的规则一致。enable或confirmInstall之后插件处于启用状态时,其他已启用、且与它共享语言的插件,各得到一步{ kind: "displacePlugin", pluginID, languageIDs },按 ID 排序,languageIDs只列共享的语言。宿主据此把对方记为停用、停掉进程,并告诉用户原因。displacePlugin定下来。disable不顶替任何插件,另一个插件的启用选择会自然接手。languageServers的旧请求行为不变。文档
lsp-plugin-lifecycle.md中英两段同步。rust/contracts/rust-core-api.md补字段、步骤和规则。pluginAPIVersion0 内的补充,不加能力版本)。验证
cargo test -p lithe-core --lib shared_plugin_lifecycle_fixture:通过。共享 fixture 新增 8 个用例、2 个非法请求用例。unknown field languageServers),实现恢复后通过。cargo clippy -p lithe-plugin-lifecycle --all-targets -D warnings、cargo fmt --check、node shared/plugins/scripts/verify-docs.mjs:通过。🤖 Generated with Claude Code