mirror of
https://github.com/walles/moar.git
synced 2024-09-11 12:15:43 +03:00
Fix the catppuccin style colors
Ref: https://github.com/walles/moar/issues/159#issuecomment-1763058160
This commit is contained in:
parent
cbbdaf632b
commit
c4e94374ac
4
go.mod
4
go.mod
@ -3,7 +3,7 @@ module github.com/walles/moar
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/alecthomas/chroma/v2 v2.4.0
|
||||
github.com/alecthomas/chroma/v2 v2.9.1
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
golang.org/x/sys v0.1.0
|
||||
@ -11,4 +11,4 @@ require (
|
||||
gotest.tools/v3 v3.3.0
|
||||
)
|
||||
|
||||
require github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
require github.com/dlclark/regexp2 v1.10.0 // indirect
|
||||
|
12
go.sum
12
go.sum
@ -1,11 +1,11 @@
|
||||
github.com/alecthomas/assert/v2 v2.2.0 h1:f6L/b7KE2bfA+9O4FL3CM/xJccDEwPVYd5fALBiuwvw=
|
||||
github.com/alecthomas/chroma/v2 v2.4.0 h1:Loe2ZjT5x3q1bcWwemqyqEi8p11/IV/ncFCeLYDpWC4=
|
||||
github.com/alecthomas/chroma/v2 v2.4.0/go.mod h1:6kHzqF5O6FUSJzBXW7fXELjb+e+7OXW4UpoPqMO7IBQ=
|
||||
github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
|
||||
github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
|
||||
github.com/alecthomas/chroma/v2 v2.9.1 h1:0O3lTQh9FxazJ4BYE/MOi/vDGuHn7B+6Bu902N2UZvU=
|
||||
github.com/alecthomas/chroma/v2 v2.9.1/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
|
||||
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq0=
|
||||
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
|
@ -592,6 +592,15 @@ func TestInitStyle(t *testing.T) {
|
||||
assert.Equal(t, testMe.linePrefix, "\x1b[38;2;235;219;178m")
|
||||
}
|
||||
|
||||
func TestInitStyle256(t *testing.T) {
|
||||
testMe := Pager{
|
||||
ChromaStyle: styles.Registry["catppuccin-macchiato"],
|
||||
ChromaFormatter: &formatters.TTY256,
|
||||
}
|
||||
testMe.initStyle()
|
||||
assert.Equal(t, testMe.linePrefix, "\x1b[38;5;189m")
|
||||
}
|
||||
|
||||
func benchmarkSearch(b *testing.B, highlighted bool) {
|
||||
// Pick a go file so we get something with highlighting
|
||||
_, sourceFilename, _, ok := runtime.Caller(0)
|
||||
|
Loading…
Reference in New Issue
Block a user