4 "github.com/alecthomas/chroma/v2"
5 "github.com/charmbracelet/crush/internal/ui/diffview"
6 "github.com/charmbracelet/crush/internal/ui/styles"
9// DiffFormatter returns a diff formatter with the given styles that can be
10// used to format diff outputs.
11func DiffFormatter(s *styles.Styles) *diffview.DiffView {
12 formatDiff := diffview.New()
13 style := chroma.MustNewStyle("crush", s.ChromaTheme())
14 diff := formatDiff.ChromaStyle(style).Style(s.Diff).TabWidth(4)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list