mirror of
https://github.com/walles/moar.git
synced 2024-09-11 12:15:43 +03:00
Get line numbers style from Chroma style
This commit is contained in:
parent
d511e50652
commit
d045cb6d37
3
build.sh
3
build.sh
@ -26,3 +26,6 @@ fi
|
||||
# This line must be last in the script so that its return code
|
||||
# propagates properly to its caller
|
||||
go build -ldflags="-s -w -X main.versionString=${VERSION}" -o "${BINARY}"
|
||||
|
||||
# Alternative build line, if you want to attach to the running process in the Go debugger:
|
||||
# go build -ldflags="-X main.versionString=${VERSION}" -gcflags='-N -l' -o "${BINARY}"
|
||||
|
@ -77,8 +77,13 @@ func styleUi(chromaStyle *chroma.Style, chromaFormatter *chroma.Formatter, statu
|
||||
return
|
||||
}
|
||||
|
||||
// FIXME: Get this from the Chroma style
|
||||
lineNumbersStyle = twin.StyleDefault.WithAttr(twin.AttrDim)
|
||||
chromaLineNumbers := twinStyleFromChroma(chromaStyle, chromaFormatter, chroma.LineNumbers)
|
||||
if chromaLineNumbers != nil {
|
||||
// If somebody can provide an example where not-dimmed line numbers
|
||||
// looks good I'll change this, but until then they will be dimmed no
|
||||
// matter what the theme authors think.
|
||||
lineNumbersStyle = chromaLineNumbers.WithAttr(twin.AttrDim)
|
||||
}
|
||||
|
||||
if standoutStyle != nil {
|
||||
statusbarStyle = *standoutStyle
|
||||
|
Loading…
Reference in New Issue
Block a user