Add LSP diagnostics to completion requests
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
The issue does not identify ECA files, tests, or entry points; first locate how completion requests are assembled and where LSP data is available. Resolve the open questions about which diagnostics to include, scope, and configurability before implementation; done means completion requests carry the agreed diagnostic context, with tests covering the chosen behavior.
由索引模型根据 Issue 内容生成。
描述
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
Completion (aka next edit prediction, ai autocomplete, ai tab complete, etc) would benefit from LSP diagnostics.
Prior Art
Cursor
Info pulled from minified JS via an Agent. Take with a grain of salt.
Example JSON
The following JSON snippet is an example payload based on the keys in the bundle. This unfortunately was not logged or pulled from a running application.
{
"linterErrors": {
"relativeWorkspacePath": "src/parser.rs",
"errors": [
{
"message": "expected `;`, found `}`",
"source": "rustc",
"uri": "file:///project/src/parser.rs",
"severity": "ERROR",
"range": {
"startPosition": { "line": 42, "column": 5 },
"endPosition": { "line": 42, "column": 6 }
},
"relatedInformation": []
}
]
},
"lspSuggestedItems": { "suggestions": [{ "label": "parse_expr" }] },
"parameterHints": [
{
"label": "fn read(path: &Path) -> Result<String, Error>",
"documentation": "Reads the entire file into a string."
}
],
"lspContexts": []
}
(Real requests include many non-LSP fields:
currentFile, diff histories,workspaceId,codeResults, timing, etc.)
Scope
linterErrorsis for the current file only.additionalFiles(visible-range snippets, paths, open files, recently viewed, etc.) can include other buffers whenenableRvfTrackingis enabled.
Zed
Zed is open source! Much easier to read. Zed sends LSP context in the user prompt. It looks like LSP diagnostics get serialized to a token friendly format and embedded into the prompt.
Link to Diagnostic type def
Link to collect_diagnostics
Link to user prompt type def
Zed also sends related_files from go to definition (from users cursor) and type defintions.
Outstanding Questions
- What LSP info should be included in the completion request
- Should the selected diagnostics be configurable in ECA config?
- Would any other request types benefit from LSP information?
- Should diagnostics be limited to the file being editted or should it include full workspace diagnostics?
- It looks like Cursor and zed both support this but have booleans to enable. There is probably a reason for the boolean. May be good to test.
- 主要语言
- Clojure
- 星标
- 1k
- 派生
- 82
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 16
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
editor-code-assistant/eca 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
editor-code-assistant/eca#661 ·
维护者通常 2 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 68/100
editor-code-assistant/eca#657 ·
维护者通常 2 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 25/100
editor-code-assistant/eca#652 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
editor-code-assistant/eca#648 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
editor-code-assistant/eca#644 · 1 条评论 ·
维护者通常 2 天内回复
查看 editor-code-assistant/eca 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
clojure-emacs/orchard#436 ·
-
needs triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
module:cql
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
.Needs Triage Priority:P3 Type:Bug
难度 2/5 1-3 小时 新手友好度 67/100
metabase/metabase#84843 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
NoahTheDuke/splint#57 · 1 条评论 ·