Skip to content

Commit

Permalink
fix(treesittertheme): correct cursorline background color
Browse files Browse the repository at this point in the history
- Update cursorline color format in generated micro themes
- Fix background color assignment for cursorline in colorscheme.go
- Adjust color-link entries for cursorline across multiple theme files
  • Loading branch information
zjl committed Nov 2, 2024
1 parent 6e3e7fb commit 659bec0
Show file tree
Hide file tree
Showing 232 changed files with 239 additions and 238 deletions.
Binary file modified pkg/treesittertheme/colorscheme/colorscheme
Binary file not shown.
13 changes: 7 additions & 6 deletions pkg/treesittertheme/colorscheme/colorscheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type File struct {
func main() {
// Sample YAML data as a string
x := "/home/z/dev/lsp/goui/pkg/treesittertheme/colorscheme/"
// os.getcwd()
x = "."
dirs, err := os.ReadDir(x)
if err != nil {
return
Expand Down Expand Up @@ -67,7 +69,7 @@ func main() {
continue
}
ret := []string{}
bg := "#263238"
bg := ""
for _, v := range data.Data {
if v.Group == "Normal" {
if len(v.Background) > 0 {
Expand All @@ -85,12 +87,11 @@ func main() {
if len(v.Background) > 0 {
b = v.Background
}

Foreground := v.Foreground
if strings.ToLower(v.Group) == "cursorline" {
Foreground = b
b = ""
}
// if strings.ToLower(v.Group) == "cursorline" {
// Foreground = b
// b = ""
// }
s := fmt.Sprintf("color-link %s \"%s,%s\"", strings.ToLower(v.Group), strings.ToUpper(Foreground), strings.ToUpper(b))
ret = append(ret, s)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/treesittertheme/colorscheme/output/aurora.micro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#EEF1F8,#590008"
color-link added "#B3F6C0,#211C2F"
color-link changed "#8CF8F7,#211C2F"
color-link removed "#FFC0B9,#211C2F"
color-link cursorline "#1A1926,"
color-link cursorline ",#1A1926"
color-link cursorcolumn ",#303047"
color-link visual ",#3F4060"
color-link statusline "#DDD0F4,#3A3754"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#444444,#262626"
color-link added "#B3F6C0,#262626"
color-link changed "#8CF8F7,#262626"
color-link removed "#FFC0B9,#262626"
color-link cursorline "#AF5F5F,"
color-link cursorline ",#AF5F5F"
color-link cursorcolumn ",#AF5F5F"
color-link visual ",#5F875F"
color-link statusline "#5F5F87,#5F875F"
Expand Down
2 changes: 1 addition & 1 deletion pkg/treesittertheme/colorscheme/output/base16-ashes.micro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#C7AE95,#1C2023"
color-link added "#B3F6C0,#1C2023"
color-link changed "#8CF8F7,#1C2023"
color-link removed "#FFC0B9,#1C2023"
color-link cursorline "#393F45,"
color-link cursorline ",#393F45"
color-link cursorcolumn ",#393F45"
color-link visual ",#565E65"
color-link statusline "#C7CCD1,#565E65"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#BE4678,#EFECF4"
color-link added "#B3F6C0,#EFECF4"
color-link changed "#8CF8F7,#EFECF4"
color-link removed "#FFC0B9,#EFECF4"
color-link cursorline "#E2DFE7,"
color-link cursorline ",#E2DFE7"
color-link cursorcolumn ",#E2DFE7"
color-link visual ",#8B8792"
color-link statusline "#585260,#8B8792"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#BE4678,#19171C"
color-link added "#B3F6C0,#19171C"
color-link changed "#8CF8F7,#19171C"
color-link removed "#FFC0B9,#19171C"
color-link cursorline "#26232A,"
color-link cursorline ",#26232A"
color-link cursorcolumn ",#26232A"
color-link visual ",#585260"
color-link statusline "#8B8792,#585260"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D73737,#FEFBEC"
color-link added "#B3F6C0,#FEFBEC"
color-link changed "#8CF8F7,#FEFBEC"
color-link removed "#FFC0B9,#FEFBEC"
color-link cursorline "#E8E4CF,"
color-link cursorline ",#E8E4CF"
color-link cursorcolumn ",#E8E4CF"
color-link visual ",#A6A28C"
color-link statusline "#6E6B5E,#A6A28C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D73737,#20201D"
color-link added "#B3F6C0,#20201D"
color-link changed "#8CF8F7,#20201D"
color-link removed "#FFC0B9,#20201D"
color-link cursorline "#292824,"
color-link cursorline ",#292824"
color-link cursorcolumn ",#292824"
color-link visual ",#6E6B5E"
color-link statusline "#A6A28C,#6E6B5E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#BA6236,#F4F3EC"
color-link added "#B3F6C0,#F4F3EC"
color-link changed "#8CF8F7,#F4F3EC"
color-link removed "#FFC0B9,#F4F3EC"
color-link cursorline "#E7E6DF,"
color-link cursorline ",#E7E6DF"
color-link cursorcolumn ",#E7E6DF"
color-link visual ",#929181"
color-link statusline "#5F5E4E,#929181"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#BA6236,#22221B"
color-link added "#B3F6C0,#22221B"
color-link changed "#8CF8F7,#22221B"
color-link removed "#FFC0B9,#22221B"
color-link cursorline "#302F27,"
color-link cursorline ",#302F27"
color-link cursorcolumn ",#302F27"
color-link visual ",#5F5E4E"
color-link statusline "#929181,#5F5E4E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F22C40,#F1EFEE"
color-link added "#B3F6C0,#F1EFEE"
color-link changed "#8CF8F7,#F1EFEE"
color-link removed "#FFC0B9,#F1EFEE"
color-link cursorline "#E6E2E0,"
color-link cursorline ",#E6E2E0"
color-link cursorcolumn ",#E6E2E0"
color-link visual ",#A8A19F"
color-link statusline "#68615E,#A8A19F"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F22C40,#1B1918"
color-link added "#B3F6C0,#1B1918"
color-link changed "#8CF8F7,#1B1918"
color-link removed "#FFC0B9,#1B1918"
color-link cursorline "#2C2421,"
color-link cursorline ",#2C2421"
color-link cursorcolumn ",#2C2421"
color-link visual ",#68615E"
color-link statusline "#A8A19F,#68615E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#CA402B,#F7F3F7"
color-link added "#B3F6C0,#F7F3F7"
color-link changed "#8CF8F7,#F7F3F7"
color-link removed "#FFC0B9,#F7F3F7"
color-link cursorline "#D8CAD8,"
color-link cursorline ",#D8CAD8"
color-link cursorcolumn ",#D8CAD8"
color-link visual ",#AB9BAB"
color-link statusline "#695D69,#AB9BAB"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#CA402B,#1B181B"
color-link added "#B3F6C0,#1B181B"
color-link changed "#8CF8F7,#1B181B"
color-link removed "#FFC0B9,#1B181B"
color-link cursorline "#292329,"
color-link cursorline ",#292329"
color-link cursorcolumn ",#292329"
color-link visual ",#695D69"
color-link statusline "#AB9BAB,#695D69"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D22D72,#EBF8FF"
color-link added "#B3F6C0,#EBF8FF"
color-link changed "#8CF8F7,#EBF8FF"
color-link removed "#FFC0B9,#EBF8FF"
color-link cursorline "#C1E4F6,"
color-link cursorline ",#C1E4F6"
color-link cursorcolumn ",#C1E4F6"
color-link visual ",#7EA2B4"
color-link statusline "#516D7B,#7EA2B4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D22D72,#EBF8FF"
color-link added "#B3F6C0,#EBF8FF"
color-link changed "#8CF8F7,#EBF8FF"
color-link removed "#FFC0B9,#EBF8FF"
color-link cursorline "#C1E4F6,"
color-link cursorline ",#C1E4F6"
color-link cursorcolumn ",#C1E4F6"
color-link visual ",#7EA2B4"
color-link statusline "#516D7B,#7EA2B4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#CA4949,#F4ECEC"
color-link added "#B3F6C0,#F4ECEC"
color-link changed "#8CF8F7,#F4ECEC"
color-link removed "#FFC0B9,#F4ECEC"
color-link cursorline "#E7DFDF,"
color-link cursorline ",#E7DFDF"
color-link cursorcolumn ",#E7DFDF"
color-link visual ",#8A8585"
color-link statusline "#585050,#8A8585"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#CA4949,#1B1818"
color-link added "#B3F6C0,#1B1818"
color-link changed "#8CF8F7,#1B1818"
color-link removed "#FFC0B9,#1B1818"
color-link cursorline "#292424,"
color-link cursorline ",#292424"
color-link cursorcolumn ",#292424"
color-link visual ",#585050"
color-link statusline "#8A8585,#585050"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#B16139,#ECF4EE"
color-link added "#B3F6C0,#ECF4EE"
color-link changed "#8CF8F7,#ECF4EE"
color-link removed "#FFC0B9,#ECF4EE"
color-link cursorline "#DFE7E2,"
color-link cursorline ",#DFE7E2"
color-link cursorcolumn ",#DFE7E2"
color-link visual ",#87928A"
color-link statusline "#526057,#87928A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#B16139,#171C19"
color-link added "#B3F6C0,#171C19"
color-link changed "#8CF8F7,#171C19"
color-link removed "#FFC0B9,#171C19"
color-link cursorline "#232A25,"
color-link cursorline ",#232A25"
color-link cursorcolumn ",#232A25"
color-link visual ",#526057"
color-link statusline "#87928A,#526057"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#E6193C,#F4FBF4"
color-link added "#B3F6C0,#F4FBF4"
color-link changed "#8CF8F7,#F4FBF4"
color-link removed "#FFC0B9,#F4FBF4"
color-link cursorline "#CFE8CF,"
color-link cursorline ",#CFE8CF"
color-link cursorcolumn ",#CFE8CF"
color-link visual ",#8CA68C"
color-link statusline "#5E6E5E,#8CA68C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#E6193C,#131513"
color-link added "#B3F6C0,#131513"
color-link changed "#8CF8F7,#131513"
color-link removed "#FFC0B9,#131513"
color-link cursorline "#242924,"
color-link cursorline ",#242924"
color-link cursorcolumn ",#242924"
color-link visual ",#5E6E5E"
color-link statusline "#8CA68C,#5E6E5E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#C94922,#F5F7FF"
color-link added "#B3F6C0,#F5F7FF"
color-link changed "#8CF8F7,#F5F7FF"
color-link removed "#FFC0B9,#F5F7FF"
color-link cursorline "#DFE2F1,"
color-link cursorline ",#DFE2F1"
color-link cursorcolumn ",#DFE2F1"
color-link visual ",#979DB4"
color-link statusline "#5E6687,#979DB4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#C94922,#202746"
color-link added "#B3F6C0,#202746"
color-link changed "#8CF8F7,#202746"
color-link removed "#FFC0B9,#202746"
color-link cursorline "#293256,"
color-link cursorline ",#293256"
color-link cursorcolumn ",#293256"
color-link visual ",#5E6687"
color-link statusline "#979DB4,#5E6687"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F07178,#FAFAFA"
color-link added "#B3F6C0,#FAFAFA"
color-link changed "#8CF8F7,#FAFAFA"
color-link removed "#FFC0B9,#FAFAFA"
color-link cursorline "#F3F4F5,"
color-link cursorline ",#F3F4F5"
color-link cursorcolumn ",#F3F4F5"
color-link visual ",#F8F9FA"
color-link statusline "#5C6773,#F8F9FA"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F28779,#171B24"
color-link added "#B3F6C0,#171B24"
color-link changed "#8CF8F7,#171B24"
color-link removed "#FFC0B9,#171B24"
color-link cursorline "#1F2430,"
color-link cursorline ",#1F2430"
color-link cursorcolumn ",#1F2430"
color-link visual ",#242936"
color-link statusline "#CCCAC2,#242936"
Expand Down
2 changes: 1 addition & 1 deletion pkg/treesittertheme/colorscheme/output/base16-bespin.micro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#CF6A4C,#28211C"
color-link added "#B3F6C0,#28211C"
color-link changed "#8CF8F7,#28211C"
color-link removed "#FFC0B9,#28211C"
color-link cursorline "#36312E,"
color-link cursorline ",#36312E"
color-link cursorcolumn ",#36312E"
color-link visual ",#5E5D5C"
color-link statusline "#8A8986,#5E5D5C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#FFFAB1,#141F2E"
color-link added "#B3F6C0,#141F2E"
color-link changed "#8CF8F7,#141F2E"
color-link removed "#FFC0B9,#141F2E"
color-link cursorline "#1E5C1E,"
color-link cursorline ",#1E5C1E"
color-link cursorcolumn ",#1E5C1E"
color-link visual ",#273E5C"
color-link statusline "#FFCC33,#273E5C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#4CE587,#182430"
color-link added "#B3F6C0,#182430"
color-link changed "#8CF8F7,#182430"
color-link removed "#FFC0B9,#182430"
color-link cursorline "#243C54,"
color-link cursorline ",#243C54"
color-link cursorcolumn ",#243C54"
color-link visual ",#46290A"
color-link statusline "#C8E1F8,#46290A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D6DBE5,#1F1F1F"
color-link added "#B3F6C0,#1F1F1F"
color-link changed "#8CF8F7,#1F1F1F"
color-link removed "#FFC0B9,#1F1F1F"
color-link cursorline "#F81118,"
color-link cursorline ",#F81118"
color-link cursorcolumn ",#F81118"
color-link visual ",#2DC55E"
color-link statusline "#4E5AB7,#2DC55E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#B38686,#485867"
color-link added "#B3F6C0,#485867"
color-link changed "#8CF8F7,#485867"
color-link removed "#FFC0B9,#485867"
color-link cursorline "#5A6D7A,"
color-link cursorline ",#5A6D7A"
color-link cursorcolumn ",#5A6D7A"
color-link visual ",#6D828E"
color-link statusline "#B0C5C8,#6D828E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#B38686,#E3EFEF"
color-link added "#B3F6C0,#E3EFEF"
color-link changed "#8CF8F7,#E3EFEF"
color-link removed "#FFC0B9,#E3EFEF"
color-link cursorline "#C9DBDC,"
color-link cursorline ",#C9DBDC"
color-link cursorcolumn ",#C9DBDC"
color-link visual ",#B0C5C8"
color-link statusline "#6D828E,#B0C5C8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#E78284,#303446"
color-link added "#B3F6C0,#303446"
color-link changed "#8CF8F7,#303446"
color-link removed "#FFC0B9,#303446"
color-link cursorline "#292C3C,"
color-link cursorline ",#292C3C"
color-link cursorcolumn ",#292C3C"
color-link visual ",#414559"
color-link statusline "#C6D0F5,#414559"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#D20F39,#EFF1F5"
color-link added "#B3F6C0,#EFF1F5"
color-link changed "#8CF8F7,#EFF1F5"
color-link removed "#FFC0B9,#EFF1F5"
color-link cursorline "#E6E9EF,"
color-link cursorline ",#E6E9EF"
color-link cursorcolumn ",#E6E9EF"
color-link visual ",#CCD0DA"
color-link statusline "#4C4F69,#CCD0DA"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#ED8796,#24273A"
color-link added "#B3F6C0,#24273A"
color-link changed "#8CF8F7,#24273A"
color-link removed "#FFC0B9,#24273A"
color-link cursorline "#1E2030,"
color-link cursorline ",#1E2030"
color-link cursorcolumn ",#1E2030"
color-link visual ",#363A4F"
color-link statusline "#CAD3F5,#363A4F"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F38BA8,#1E1E2E"
color-link added "#B3F6C0,#1E1E2E"
color-link changed "#8CF8F7,#1E1E2E"
color-link removed "#FFC0B9,#1E1E2E"
color-link cursorline "#181825,"
color-link cursorline ",#181825"
color-link cursorcolumn ",#181825"
color-link visual ",#313244"
color-link statusline "#CDD6F4,#313244"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#F28FAD,#1E1E28"
color-link added "#B3F6C0,#1E1E28"
color-link changed "#8CF8F7,#1E1E28"
color-link removed "#FFC0B9,#1E1E28"
color-link cursorline "#1A1826,"
color-link cursorline ",#1A1826"
color-link cursorcolumn ",#1A1826"
color-link visual ",#302D41"
color-link statusline "#D7DAE0,#302D41"
Expand Down
2 changes: 1 addition & 1 deletion pkg/treesittertheme/colorscheme/output/base16-chalk.micro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#FB9FB1,#151515"
color-link added "#B3F6C0,#151515"
color-link changed "#8CF8F7,#151515"
color-link removed "#FFC0B9,#151515"
color-link cursorline "#202020,"
color-link cursorline ",#202020"
color-link cursorcolumn ",#202020"
color-link visual ",#303030"
color-link statusline "#D0D0D0,#303030"
Expand Down
2 changes: 1 addition & 1 deletion pkg/treesittertheme/colorscheme/output/base16-circus.micro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#DC657D,#191919"
color-link added "#B3F6C0,#191919"
color-link changed "#8CF8F7,#191919"
color-link removed "#FFC0B9,#191919"
color-link cursorline "#202020,"
color-link cursorline ",#202020"
color-link cursorcolumn ",#202020"
color-link visual ",#303030"
color-link statusline "#A7A7A7,#303030"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#AC4142,#151515"
color-link added "#B3F6C0,#151515"
color-link changed "#8CF8F7,#151515"
color-link removed "#FFC0B9,#151515"
color-link cursorline "#202020,"
color-link cursorline ",#202020"
color-link cursorcolumn ",#202020"
color-link visual ",#303030"
color-link statusline "#D0D0D0,#303030"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ color-link error "#AC4142,#F5F5F5"
color-link added "#B3F6C0,#F5F5F5"
color-link changed "#8CF8F7,#F5F5F5"
color-link removed "#FFC0B9,#F5F5F5"
color-link cursorline "#E0E0E0,"
color-link cursorline ",#E0E0E0"
color-link cursorcolumn ",#E0E0E0"
color-link visual ",#D0D0D0"
color-link statusline "#303030,#D0D0D0"
Expand Down
Loading

0 comments on commit 659bec0

Please sign in to comment.