| 1 | import { tags as t } from "@lezer/highlight" |
| 2 | export const tokenStyles = { |
| 3 | "dark": [ |
| 4 | { |
| 5 | tag: [ |
| 6 | t.keyword, |
| 7 | t.operatorKeyword, |
| 8 | t.modifier, |
| 9 | t.color, |
| 10 | t.constant(t.name), |
| 11 | t.standard(t.name), |
| 12 | t.standard(t.tagName), |
| 13 | t.special(t.brace), |
| 14 | t.atom, |
| 15 | t.bool, |
| 16 | t.special(t.variableName), |
| 17 | ], |
| 18 | color: '#569cd6', |
| 19 | }, |
| 20 | { tag: [t.controlKeyword, t.moduleKeyword], color: '#c586c0' }, |
| 21 | { |
| 22 | tag: [ |
| 23 | t.name, |
| 24 | t.deleted, |
| 25 | t.character, |
| 26 | t.macroName, |
| 27 | t.propertyName, |
| 28 | t.variableName, |
| 29 | t.labelName, |
| 30 | t.definition(t.name), |
| 31 | ], |
| 32 | color: '#9cdcfe', |
| 33 | }, |
| 34 | { tag: t.heading, fontWeight: 'bold', color: '#9cdcfe' }, |
| 35 | { |
| 36 | tag: [t.typeName, t.className, t.tagName, t.number, t.changed, t.annotation, t.self, t.namespace], |
| 37 | color: '#4ec9b0', |
| 38 | }, |
| 39 | { tag: [t.function(t.variableName), t.function(t.propertyName)], color: '#dcdcaa' }, |
| 40 | { tag: [t.number], color: '#b5cea8' }, |
| 41 | { tag: [t.operator, t.punctuation, t.separator, t.url, t.escape, t.regexp], color: '#d4d4d4' }, |
| 42 | { tag: [t.regexp], color: '#d16969' }, |
| 43 | { tag: [t.special(t.string), t.processingInstruction, t.string, t.inserted], color: '#ce9178' }, |
| 44 | { tag: [t.angleBracket], color: '#808080' }, |
| 45 | { tag: t.strong, fontWeight: 'bold' }, |
| 46 | { tag: t.emphasis, fontStyle: 'italic' }, |
| 47 | { tag: t.strikethrough, textDecoration: 'line-through' }, |
| 48 | { tag: [t.meta, t.comment], color: '#6a9955' }, |
| 49 | { tag: t.link, color: '#6a9955', textDecoration: 'underline' }, |
| 50 | { tag: t.invalid, color: '#ff0000' }, |
| 51 | ], |
| 52 | "light": [ |
| 53 | { |
| 54 | tag: [ |
| 55 | t.keyword, |
| 56 | t.operatorKeyword, |
| 57 | t.modifier, |
| 58 | t.color, |
| 59 | t.constant(t.name), |
| 60 | t.standard(t.name), |
| 61 | t.standard(t.tagName), |
| 62 | t.special(t.brace), |
| 63 | t.atom, |
| 64 | t.bool, |
| 65 | t.special(t.variableName), |
| 66 | ], |
| 67 | color: '#0000ff', |
| 68 | }, |
| 69 | { tag: [t.moduleKeyword, t.controlKeyword], color: '#af00db' }, |
| 70 | { |
| 71 | tag: [ |
| 72 | t.name, |
| 73 | t.deleted, |
| 74 | t.character, |
| 75 | t.macroName, |
| 76 | t.propertyName, |
| 77 | t.variableName, |
| 78 | t.labelName, |
| 79 | t.definition(t.name), |
| 80 | ], |
| 81 | color: '#0070c1', |
| 82 | }, |
| 83 | { tag: t.heading, fontWeight: 'bold', color: '#0070c1' }, |
| 84 | { |
| 85 | tag: [t.typeName, t.className, t.tagName, t.number, t.changed, t.annotation, t.self, t.namespace], |
| 86 | color: '#267f99', |
| 87 | }, |
| 88 | { tag: [t.function(t.variableName), t.function(t.propertyName)], color: '#795e26' }, |
| 89 | { tag: [t.number], color: '#098658' }, |
| 90 | { tag: [t.operator, t.punctuation, t.separator, t.url, t.escape, t.regexp], color: '#383a42' }, |
| 91 | { tag: [t.regexp], color: '#af00db' }, |
| 92 | { tag: [t.special(t.string), t.processingInstruction, t.string, t.inserted], color: '#a31515' }, |
| 93 | { tag: [t.angleBracket], color: '#383a42' }, |
| 94 | { tag: t.strong, fontWeight: 'bold' }, |
| 95 | { tag: t.emphasis, fontStyle: 'italic' }, |
| 96 | { tag: t.strikethrough, textDecoration: 'line-through' }, |
| 97 | { tag: [t.meta, t.comment], color: '#008000' }, |
| 98 | { tag: t.link, color: '#4078f2', textDecoration: 'underline' }, |
| 99 | { tag: t.invalid, color: '#e45649' }, |
| 100 | ] |
| 101 | } |