Download internal/ui/common/diff.go from SaylorTwift/crush: direct link, hf CLI and curl.
- Browser
- Download file 426 Bytes
-
https://huggingface.co/SaylorTwift/crush/resolve/main/internal/ui/common/diff.go
- Command line
-
hf download hf://SaylorTwift/crush/internal/ui/common/diff.go
-
curl -L -o diff.go https://huggingface.co/SaylorTwift/crush/resolve/main/internal/ui/common/diff.go
426 Bytes
| package common | |
| import ( | |
| "github.com/charmbracelet/crush/internal/ui/diffview" | |
| "github.com/charmbracelet/crush/internal/ui/styles" | |
| ) | |
| // DiffFormatter returns a diff formatter with the given styles that can be | |
| // used to format diff outputs. | |
| func DiffFormatter(s *styles.Styles) *diffview.DiffView { | |
| formatDiff := diffview.New() | |
| diff := formatDiff.ChromaStyle(ChromaStyle(s, nil)).Style(s.Diff).TabWidth(4) | |
| return diff | |
| } | |