mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #589] feat: Show parent function/class context in diff hunk headers #160
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#160
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @remorses on GitHub (Jan 25, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/589
Similar to GitHub's diff view, it would be helpful to see which function/method/class a diff hunk belongs to. This provides immediate context about where changes are happening.
Example
Current:
With parent context:
The
@@lines would be styled like dimmed context lines, showing the enclosing scope for each hunk.Implementation idea
Use tree-sitter to query for scope-defining nodes (functions, methods, classes) and find the enclosing scope for each hunk's starting line.