✨ Display Issues as Line Annotations In Source Editor
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- swift
研究方向
首先定位 DiagnosticManager、DiagnosticIssue 以及使用 CodeEditSourceEditor 的檢視。追蹤目前檔案的識別方式,並將其診斷資訊接入傳遞給編輯器的 LineAnnotation 值;完成的標準是使用現有的編輯器呈現,在受影響的行下方顯示檔案專屬的註解。
由索引模型根據 Issue 內容生成。
描述
Description
Use the newly created DiagnosticManager to provide file-specific diagnostics to the editor via LineAnnotations. This connection allows visual issues to appear directly in the source editor view below the affected lines.
Requirements
- Convert
DiagnosticIssueinstances for the current file intoLineAnnotationobjects:struct LineAnnotation: Hashable, Identifiable { let id: UUID = UUID() let line: Int let column: Int let severity: DiagnosticIssue.Severity let text: String } - Extend
DiagnosticManagerwith a helper:func annotations(for file: URL) -> Set<LineAnnotation> - In views where
CodeEditSourceEditoris used:- Access the current file’s annotations using the manager
- Pass them into the editor view via:
annotations: Set<LineAnnotation> - The editor should already know how to render the annotations; this task is only concerned with wiring up the data source.
Additional Context
This connects the data produced by DiagnosticManager to line annotations introduced in CodeEditSourceEditor. This is a key step in surfacing diagnostics in a context-aware and developer-friendly way.
Later extensions might include showing annotations from multiple sources, updating annotations live from LSP, or supporting quick fixes from the underlying DiagnosticIssue.
Related Issues
- #2014 (pre-requisite)
- https://github.com/CodeEditApp/CodeEditSourceEditor/issues/297 (pre-requisite)
- #354
- 主要語言
- Swift
- 星號
- 23k
- 分支
- 1.2k
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodeEditApp/CodeEdit 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
CodeEditApp/CodeEdit#2190 ·
-
難度 1/5 1 小時以內 新手友好度 15/100
CodeEditApp/CodeEdit#2195 · 7 個 reaction ·
-
enhancement
難度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2185 ·
-
難度 5/5 一週以上 新手友好度 25/100
CodeEditApp/CodeEdit#2181 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2180 ·
查看 CodeEditApp/CodeEdit 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
googleapis/google-cloud-swift#1151 ·
-
`--app` focus through the daemon can pick an off-screen window and refuse with `axElementNotFound` 未關閉clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P1
難度 2/5 1-3 小時 新手友好度 88/100
-
code health
難度 1/5 1 小時以內 新手友好度 72/100
apple/coreai-models#288 ·
-
task
難度 2/5 1-3 小時 新手友好度 70/100
vsanthanam/JBird#429 ·
-
難度 2/5 1-3 小時 新手友好度 82/100