✨ 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 · 5 个 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
-
area:dictation documentation P2
难度 2/5 1-3 小时 新手友好度 78/100
uttrflow/uttrflow-swift#1180 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 84/100
OneBusAway/onebusaway-ios#1451 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
type: docs
难度 1/5 1 小时以内 新手友好度 95/100
googleapis/google-cloud-swift#971 ·