1
1
import { tags as t } from '@lezer/highlight' ;
2
- import { createTheme , CreateThemeOptions } from '@uiw/codemirror-themes' ;
3
- import { config } from './color' ;
2
+ import { createTheme , type CreateThemeOptions } from '@uiw/codemirror-themes' ;
3
+ import { config as c } from './color' ;
4
4
5
5
export const defaultSettingsQuietlight : CreateThemeOptions [ 'settings' ] = {
6
- background : config . background ,
7
- foreground : config . foreground ,
8
- caret : config . cursor ,
9
- selection : config . selection ,
10
- selectionMatch : config . selection ,
11
- gutterBackground : config . background ,
12
- gutterForeground : config . foreground ,
6
+ background : c . background ,
7
+ foreground : c . foreground ,
8
+ caret : c . cursor ,
9
+ selection : c . selection ,
10
+ selectionMatch : c . selection ,
11
+ gutterBackground : c . background ,
12
+ gutterForeground : c . foreground ,
13
13
gutterBorder : 'transparent' ,
14
- lineHighlight : config . activeLine ,
14
+ lineHighlight : c . activeLine ,
15
15
} ;
16
16
17
17
export const quietlightInit = ( options ?: Partial < CreateThemeOptions > ) => {
@@ -23,26 +23,26 @@ export const quietlightInit = (options?: Partial<CreateThemeOptions>) => {
23
23
...settings ,
24
24
} ,
25
25
styles : [
26
- { tag : t . keyword , color : config . keyword } ,
27
- { tag : [ t . name , t . deleted , t . character , t . macroName ] , color : config . variable } ,
28
- { tag : [ t . propertyName ] , color : config . function } ,
29
- { tag : [ t . processingInstruction , t . string , t . inserted , t . special ( t . string ) ] , color : config . string } ,
30
- { tag : [ t . function ( t . variableName ) , t . labelName ] , color : config . function } ,
31
- { tag : [ t . color , t . constant ( t . name ) , t . standard ( t . name ) ] , color : config . constant } ,
32
- { tag : [ t . definition ( t . name ) , t . separator ] , color : config . variable } ,
33
- { tag : [ t . className ] , color : config . class } ,
34
- { tag : [ t . number , t . changed , t . annotation , t . modifier , t . self , t . namespace ] , color : config . number } ,
35
- { tag : [ t . typeName ] , color : config . type , fontStyle : config . type } ,
36
- { tag : [ t . operator , t . operatorKeyword ] , color : config . keyword } ,
37
- { tag : [ t . url , t . escape , t . regexp , t . link ] , color : config . regexp } ,
38
- { tag : [ t . meta , t . comment ] , color : config . comment } ,
39
- { tag : t . tagName , color : config . tag } ,
26
+ { tag : t . keyword , color : c . keyword } ,
27
+ { tag : [ t . name , t . deleted , t . character , t . macroName ] , color : c . variable } ,
28
+ { tag : [ t . propertyName ] , color : c . function } ,
29
+ { tag : [ t . processingInstruction , t . string , t . inserted , t . special ( t . string ) ] , color : c . string } ,
30
+ { tag : [ t . function ( t . variableName ) , t . labelName ] , color : c . function } ,
31
+ { tag : [ t . color , t . constant ( t . name ) , t . standard ( t . name ) ] , color : c . constant } ,
32
+ { tag : [ t . definition ( t . name ) , t . separator ] , color : c . variable } ,
33
+ { tag : [ t . className ] , color : c . class } ,
34
+ { tag : [ t . number , t . changed , t . annotation , t . modifier , t . self , t . namespace ] , color : c . number } ,
35
+ { tag : [ t . typeName ] , color : c . type , fontStyle : c . type } ,
36
+ { tag : [ t . operator , t . operatorKeyword ] , color : c . keyword } ,
37
+ { tag : [ t . url , t . escape , t . regexp , t . link ] , color : c . regexp } ,
38
+ { tag : [ t . meta , t . comment ] , color : c . comment } ,
39
+ { tag : t . tagName , color : c . tag } ,
40
40
{ tag : t . strong , fontWeight : 'bold' } ,
41
41
{ tag : t . emphasis , fontStyle : 'italic' } ,
42
42
{ tag : t . link , textDecoration : 'underline' } ,
43
- { tag : t . heading , fontWeight : 'bold' , color : config . heading } ,
44
- { tag : [ t . atom , t . bool , t . special ( t . variableName ) ] , color : config . variable } ,
45
- { tag : t . invalid , color : config . invalid } ,
43
+ { tag : t . heading , fontWeight : 'bold' , color : c . heading } ,
44
+ { tag : [ t . atom , t . bool , t . special ( t . variableName ) ] , color : c . variable } ,
45
+ { tag : t . invalid , color : c . invalid } ,
46
46
{ tag : t . strikethrough , textDecoration : 'line-through' } ,
47
47
...styles ,
48
48
] ,
0 commit comments