Prerequisites
Proposal
Add support for custom gutter columns that display per-line metadata alongside code content.
This could be exposed as a renderGutter callback or a gutters prop:
// Option A: Simple callback
<File
file={file}
renderGutter={(lineNumber: number) => (
<span className="blame">{blameData[lineNumber].author}</span>
)}
/>
// Option B: Multiple gutters
<File
file={file}
gutters={[
{ id: 'blame', width: 180, render: (line) => <BlameInfo line={line} /> }
]}
/>
This would enable displaying git blame information (author, commit hash, date), inline linting/CI
annotations, and custom line markers.
Motivation and context
When building code review or repository browsing tools, users often need to see git blame data alongside each line. Currently there's no way to render persistent per-line content in a gutter column:
- Annotations render as blocks below lines, not inline
- renderHoverUtility only shows on hover, not persistently
- unsafeCSS can style lines but cannot inject text content
The workaround is building a parallel column outside the component with synchronized scrolling, which is complex due to Shadow DOM encapsulation.
This is a common feature in code editors (VS Code, GitHub, GitLab) and would expand the library's use cases for code analysis and review tools.
Prerequisites
Proposal
Add support for custom gutter columns that display per-line metadata alongside code content.
This could be exposed as a renderGutter callback or a gutters prop:
This would enable displaying git blame information (author, commit hash, date), inline linting/CI
annotations, and custom line markers.
Motivation and context
When building code review or repository browsing tools, users often need to see git blame data alongside each line. Currently there's no way to render persistent per-line content in a gutter column:
The workaround is building a parallel column outside the component with synchronized scrolling, which is complex due to Shadow DOM encapsulation.
This is a common feature in code editors (VS Code, GitHub, GitLab) and would expand the library's use cases for code analysis and review tools.