-
Notifications
You must be signed in to change notification settings - Fork 3
/
styles.go
63 lines (61 loc) · 1.42 KB
/
styles.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package main
import "github.com/gdamore/tcell"
func style(name string) tcell.Style {
// TODO make table based and configurable
if name == "message.error" {
return tcell.StyleDefault.
Foreground(tcell.ColorMaroon)
}
if name == "statusbar" {
return tcell.StyleDefault.
Foreground(tcell.ColorWhite).
Background(tcell.Color(5))
}
if name == "statusbar.highlight" {
return tcell.StyleDefault.
Foreground(tcell.ColorWhite).
Background(tcell.Color(6))
}
if name == "linenumber" {
return tcell.StyleDefault.
Foreground(tcell.Color(6))
}
if name == "search" {
return tcell.StyleDefault.
Foreground(tcell.ColorWhite).
Background(tcell.ColorOlive)
}
if name == "visual" {
return tcell.StyleDefault.
Foreground(tcell.ColorWhite).
Background(tcell.Color(0))
}
if name == "special" {
return tcell.StyleDefault.
Foreground(tcell.Color(0))
}
if name == "text.string" {
return tcell.StyleDefault.
Foreground(tcell.ColorNavy)
}
if name == "text.number" {
return tcell.StyleDefault.
Foreground(tcell.ColorOlive)
}
if name == "text.comment" {
return tcell.StyleDefault.
Foreground(10)
}
if name == "text.reserved" {
return tcell.StyleDefault.
Foreground(tcell.Color(8))
}
if name == "text.special" {
return tcell.StyleDefault.
Foreground(tcell.Color(6))
}
if name == "cursor" {
return tcell.StyleDefault.Reverse(true)
}
return tcell.StyleDefault.Foreground(tcell.Color(0))
}