[Feature] 编辑器支持 Annotate with Git Blame:行号旁显示修改日期 / 修改人,点击跳转到对应提交
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, typescript
- Domain
- developer-experience, devtools
Research direction
Start by inspecting the editor’s line number context menu and the existing “使用 Git Blame 注释” implementation, then trace how Git History opens commit details. The issue describes the desired gutter annotations, hover details, click behavior, and context menu actions, but does not name files or tests. Done means blame annotations can be toggled per file, show date and author, expose commit details and navigation, and avoid full-file blame on every edit.
Written by the indexing model from the issue text.
Description
Problem to solve / 要解决的问题
当前 Lithe 已有“使用 Git Blame 注释”,但它打开的是一个弹框:
- 弹框里的 Blame 历史无法点击,无法定位 / 跳转到对应的 Git 提交历史,也看不到该提交的改动内容;
- 看完弹框要关掉再去 Git History 面板里手动找提交,流程是断的,排查“这行是谁、什么时候、为什么改的”很不方便。
Proposed solution / 建议方案
参考 IntelliJ IDEA 的 Annotate with Git Blame 实现:
- 入口:在编辑器行号区域右键菜单中增加
Annotate with Git Blame(与 IDEA 同名,便于 IDEA 用户找到),可开关,再次点击 / 选择 Close Annotations 关闭。 - 展示位置:开启后,在行号右侧、代码左侧增加一列注释(annotation gutter),按提交分块显示,每行 / 每块只显示两项,和 IDEA 一致,不需要短 hash:
- 修改日期(如
2026/6/23) - 修改人
- 未提交的行明确标注
Uncommitted changes
- 修改日期(如
- Hover 即看提交历史:鼠标移到某一行注释上,弹出该行的提交信息(commit、Author、Date、提交说明),不用点开、不用跳转就能先看一眼。
- 可点击跳转:点击某一行的注释,直接跳转到对应的 Git 提交历史 / 提交详情(提交信息、改动文件、diff),而不是只能看列表。
- 配套操作(参考 IDEA):
- 右键注释:Show History / 显示行历史、Show Diff、Copy Revision Number
- 性能:只对当前文件 / 可见范围做 blame,避免每次输入都全量重新 blame(之前 #343、#187 有过类似回归)。
现有弹框形式的“使用 Git Blame 注释”可保留作为补充,但不应是唯一的 Blame 查看方式;行内 Blame(inline blame)也不应替代 gutter 注释,两者可共存。
Target platform / 目标平台
macOS
Area / 模块
Editor / 编辑器
Priority / 优先级
P2 / 后续考虑:目前不着急,可安排到后续版本
Alternatives considered / 已考虑的替代方案
- 继续用弹框 + 手动去 Git History 里找提交:能用,但每次都要多步查找,且无法从行直接定位提交。
- 用“显示行历史”:只能看单行历史,无法像 Annotate 一样一眼扫过整个文件的修改分布。
Additional context / 补充信息
Lithe 版本:0.8.26
操作系统与架构:macOS Version 27.2.1 (Build 26B131) · arm64
环境信息:build: b963c8a · 2026-12-03;runtime: go1.27.4
- 参考:IntelliJ IDEA 右键行号菜单中的
Annotate with Git Blame(见截图 1),开启后注释列直接显示在行号旁。 - 现状:Lithe 行号右键菜单中的“使用 Git Blame 注释”(见截图 2)目前是弹框展示,弹框内历史不可点击、不可定位提交。
- 相关已关闭 Issue:#451、#1128 当时提的正是这个需求,现实现为弹框,未达到 IDEA 式 gutter 注释 + 点击跳转的效果,故新开此 Issue 作为后续跟进。
截图说明:
- IDEA 的
Annotate with Git Blame菜单 - Lithe 现有行号右键菜单,“使用 Git Blame 注释”
- IDEA 注释列只显示日期 + 修改人,hover 弹出对应提交的 commit / Author / Date / 提交说明
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复建议。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 3h 13m
- Merged PRs (30d)
- 614
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
enhancement issue-form:feature review: medium
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
1lck/Lithe-IDEA#2678 ·
Maintainers usually reply within 1 day
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
1lck/Lithe-IDEA#2565 ·
Maintainers usually reply within 1 day
-
area:ui enhancement P2 platform:cross-platform refactor review: high
Difficulty 1/5 Under an hour Newbie friendliness 84/100
1lck/Lithe-IDEA#2365 · 1 comment ·
Maintainers usually reply within 1 day
-
area:ai enhancement P2 review: high
Difficulty 5/5 Over a week Newbie friendliness 39/100
1lck/Lithe-IDEA#2660 ·
Maintainers usually reply within 1 day
-
[Bug] Lithe 操作运行期间另一个程序写入的文本,本地历史有时记成用户(TestLocalHistoryTellsAnOperationsWriteFromAnotherPrograms 约 1/4 失败)Possibly taken @WhiteZeek claimed this today. Openarea:editor bug P2 platform:macos review: high
Difficulty 4/5 3-5 days Newbie friendliness 35/100
1lck/Lithe-IDEA#2657 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agilepathway/label-checker#1015 · 2 comments ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P3
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
react-component/image#541 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day