@@ -5,12 +5,16 @@ import (
"github.com/charmbracelet/x/exp/charmtone"
)
+// LineStyle defines the styles for a given line type in the diff view.
type LineStyle struct {
LineNumber lipgloss.Style
Symbol lipgloss.Style
Code lipgloss.Style
}
+// Style defines the overall style for the diff view, including styles for
+// different line types such as divider, missing, equal, insert, and delete
+// lines.
type Style struct {
DividerLine LineStyle
MissingLine LineStyle
@@ -19,6 +23,7 @@ type Style struct {
DeleteLine LineStyle
}
+// DefaultLightStyle provides a default light theme style for the diff view.
var DefaultLightStyle = Style{
DividerLine: LineStyle{
LineNumber: lipgloss.NewStyle().
@@ -66,6 +71,7 @@ var DefaultLightStyle = Style{
},
}
+// DefaultDarkStyle provides a default dark theme style for the diff view.
var DefaultDarkStyle = Style{
DividerLine: LineStyle{
LineNumber: lipgloss.NewStyle().