|
1 | 1 | import { tags as t } from '@lezer/highlight';
|
2 | 2 | import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
3 | 3 |
|
4 |
| -export const lightTheme = syntaxHighlighting( |
5 |
| - HighlightStyle.define([ |
6 |
| - { tag: t.meta, color: '#404740' }, |
7 |
| - { tag: t.link, textDecoration: 'underline' }, |
8 |
| - { tag: t.heading, textDecoration: 'underline', fontWeight: 'bold' }, |
9 |
| - { tag: t.emphasis, fontStyle: 'italic' }, |
10 |
| - { tag: t.strong, fontWeight: 'bold' }, |
11 |
| - { tag: t.strikethrough, textDecoration: 'line-through' }, |
12 |
| - { tag: t.keyword, color: '#708' }, |
13 |
| - { tag: [t.atom, t.bool, t.url, t.contentSeparator, t.labelName], color: '#219' }, |
14 |
| - { tag: [t.literal, t.inserted], color: '#164' }, |
15 |
| - { tag: [t.string, t.deleted], color: '#a11' }, |
16 |
| - { tag: [t.regexp, t.escape, t.special(t.string)], color: '#e40' }, |
17 |
| - { tag: t.definition(t.variableName), color: '#00f' }, |
18 |
| - { tag: t.variableName, color: '#30a' }, |
19 |
| - { tag: t.local(t.variableName), color: '#30a' }, |
20 |
| - { tag: [t.typeName, t.namespace], color: '#085' }, |
21 |
| - { tag: t.className, color: '#167' }, |
22 |
| - { tag: [t.special(t.variableName), t.macroName], color: '#256' }, |
23 |
| - { tag: t.definition(t.propertyName), color: '#00c' }, |
24 |
| - { tag: [t.processingInstruction, t.inserted], color: '#05a' }, |
25 |
| - { tag: t.comment, color: '#940' }, |
26 |
| - { tag: t.invalid, color: '#f00' } |
27 |
| - ]), |
28 |
| - { fallback: true } |
29 |
| -); |
| 4 | +export const lightHighlightStyle = HighlightStyle.define([ |
| 5 | + { tag: t.meta, color: '#404740' }, |
| 6 | + { tag: t.link, textDecoration: 'underline' }, |
| 7 | + { tag: t.heading, textDecoration: 'underline', fontWeight: 'bold' }, |
| 8 | + { tag: t.emphasis, fontStyle: 'italic' }, |
| 9 | + { tag: t.strong, fontWeight: 'bold' }, |
| 10 | + { tag: t.strikethrough, textDecoration: 'line-through' }, |
| 11 | + { tag: t.keyword, color: '#708' }, |
| 12 | + { tag: [t.atom, t.bool, t.url, t.contentSeparator, t.labelName], color: '#219' }, |
| 13 | + { tag: [t.literal, t.inserted], color: '#164' }, |
| 14 | + { tag: [t.string, t.deleted], color: '#a11' }, |
| 15 | + { tag: [t.regexp, t.escape, t.special(t.string)], color: '#e40' }, |
| 16 | + { tag: t.definition(t.variableName), color: '#00f' }, |
| 17 | + { tag: t.variableName, color: '#30a' }, |
| 18 | + { tag: t.local(t.variableName), color: '#30a' }, |
| 19 | + { tag: [t.typeName, t.namespace], color: '#085' }, |
| 20 | + { tag: t.className, color: '#167' }, |
| 21 | + { tag: [t.special(t.variableName), t.macroName], color: '#256' }, |
| 22 | + { tag: t.definition(t.propertyName), color: '#00c' }, |
| 23 | + { tag: [t.processingInstruction, t.inserted], color: '#05a' }, |
| 24 | + { tag: t.comment, color: '#940' }, |
| 25 | + { tag: t.invalid, color: '#f00' } |
| 26 | +]); |
| 27 | + |
| 28 | +export const lightTheme = syntaxHighlighting(lightHighlightStyle, { fallback: true }); |
0 commit comments