@@ -45,22 +45,31 @@ impl Default for EditorConfig {
45
45
Self {
46
46
theme_on_focus : EditorTheme {
47
47
prefix : String :: from ( "❯❯ " ) ,
48
- prefix_style : StyleBuilder :: new ( ) . fgc ( Color :: Blue ) . build ( ) ,
49
- active_char_style : StyleBuilder :: new ( ) . bgc ( Color :: Magenta ) . build ( ) ,
50
- inactive_char_style : StyleBuilder :: new ( ) . build ( ) ,
48
+ prefix_style : ContentStyle {
49
+ foreground_color : Some ( Color :: Blue ) ,
50
+ ..Default :: default ( )
51
+ } ,
52
+ active_char_style : ContentStyle {
53
+ background_color : Some ( Color :: Magenta ) ,
54
+ ..Default :: default ( )
55
+ } ,
56
+ inactive_char_style : ContentStyle :: default ( ) ,
51
57
} ,
52
58
theme_on_defocus : EditorTheme {
53
59
prefix : String :: from ( "▼ " ) ,
54
- prefix_style : StyleBuilder :: new ( )
55
- . fgc ( Color :: Blue )
56
- . attrs ( Attributes :: from ( Attribute :: Dim ) )
57
- . build ( ) ,
58
- active_char_style : StyleBuilder :: new ( )
59
- . attrs ( Attributes :: from ( Attribute :: Dim ) )
60
- . build ( ) ,
61
- inactive_char_style : StyleBuilder :: new ( )
62
- . attrs ( Attributes :: from ( Attribute :: Dim ) )
63
- . build ( ) ,
60
+ prefix_style : ContentStyle {
61
+ foreground_color : Some ( Color :: Blue ) ,
62
+ attributes : Attributes :: from ( Attribute :: Dim ) ,
63
+ ..Default :: default ( )
64
+ } ,
65
+ active_char_style : ContentStyle {
66
+ attributes : Attributes :: from ( Attribute :: Dim ) ,
67
+ ..Default :: default ( )
68
+ } ,
69
+ inactive_char_style : ContentStyle {
70
+ attributes : Attributes :: from ( Attribute :: Dim ) ,
71
+ ..Default :: default ( )
72
+ } ,
64
73
} ,
65
74
mode : Mode :: Insert ,
66
75
word_break_chars : HashSet :: from ( [ '.' , '|' , '(' , ')' , '[' , ']' ] ) ,
@@ -106,17 +115,28 @@ impl Default for JsonConfig {
106
115
max_streams : None ,
107
116
theme : JsonTheme {
108
117
indent : 2 ,
109
- curly_brackets_style : StyleBuilder :: new ( )
110
- . attrs ( Attributes :: from ( Attribute :: Bold ) )
111
- . build ( ) ,
112
- square_brackets_style : StyleBuilder :: new ( )
113
- . attrs ( Attributes :: from ( Attribute :: Bold ) )
114
- . build ( ) ,
115
- key_style : StyleBuilder :: new ( ) . fgc ( Color :: Cyan ) . build ( ) ,
116
- string_value_style : StyleBuilder :: new ( ) . fgc ( Color :: Green ) . build ( ) ,
117
- number_value_style : StyleBuilder :: new ( ) . build ( ) ,
118
- boolean_value_style : StyleBuilder :: new ( ) . build ( ) ,
119
- null_value_style : StyleBuilder :: new ( ) . fgc ( Color :: Grey ) . build ( ) ,
118
+ curly_brackets_style : ContentStyle {
119
+ attributes : Attributes :: from ( Attribute :: Bold ) ,
120
+ ..Default :: default ( )
121
+ } ,
122
+ square_brackets_style : ContentStyle {
123
+ attributes : Attributes :: from ( Attribute :: Bold ) ,
124
+ ..Default :: default ( )
125
+ } ,
126
+ key_style : ContentStyle {
127
+ foreground_color : Some ( Color :: Cyan ) ,
128
+ ..Default :: default ( )
129
+ } ,
130
+ string_value_style : ContentStyle {
131
+ foreground_color : Some ( Color :: Green ) ,
132
+ ..Default :: default ( )
133
+ } ,
134
+ number_value_style : ContentStyle :: default ( ) ,
135
+ boolean_value_style : ContentStyle :: default ( ) ,
136
+ null_value_style : ContentStyle {
137
+ foreground_color : Some ( Color :: Grey ) ,
138
+ ..Default :: default ( )
139
+ } ,
120
140
} ,
121
141
}
122
142
}
@@ -143,11 +163,15 @@ impl Default for CompletionConfig {
143
163
cursor : String :: from ( "❯ " ) ,
144
164
search_result_chunk_size : 100 ,
145
165
search_load_chunk_size : 50000 ,
146
- active_item_style : StyleBuilder :: new ( )
147
- . fgc ( Color :: Grey )
148
- . bgc ( Color :: Yellow )
149
- . build ( ) ,
150
- inactive_item_style : StyleBuilder :: new ( ) . fgc ( Color :: Grey ) . build ( ) ,
166
+ active_item_style : ContentStyle {
167
+ foreground_color : Some ( Color :: Grey ) ,
168
+ background_color : Some ( Color :: Yellow ) ,
169
+ ..Default :: default ( )
170
+ } ,
171
+ inactive_item_style : ContentStyle {
172
+ foreground_color : Some ( Color :: Grey ) ,
173
+ ..Default :: default ( )
174
+ } ,
151
175
}
152
176
}
153
177
}
0 commit comments