|
| 1 | +import { tags as t } from '@lezer/highlight'; |
| 2 | +import { createTheme } from '@uiw/codemirror-themes'; |
| 3 | + |
| 4 | +export const material = createTheme({ |
| 5 | + theme: 'dark', |
| 6 | + settings: { |
| 7 | + background: '#2e3235', |
| 8 | + foreground: '#bdbdbd', |
| 9 | + caret: '#a0a4ae', |
| 10 | + selection: '#d7d4f0', |
| 11 | + selectionMatch: '#d7d4f0', |
| 12 | + gutterBackground: '#2e3235', |
| 13 | + gutterForeground: '#999', |
| 14 | + gutterActiveForeground: '#4f5b66', |
| 15 | + lineHighlight: '#545b61', |
| 16 | + }, |
| 17 | + styles: [ |
| 18 | + { tag: t.keyword, color: '#cf6edf' }, |
| 19 | + { |
| 20 | + tag: [t.name, t.deleted, t.character, t.macroName], |
| 21 | + color: '#56c8d8', |
| 22 | + }, |
| 23 | + { tag: [t.propertyName], color: '#facf4e' }, |
| 24 | + { tag: [t.variableName], color: '#bdbdbd' }, |
| 25 | + { tag: [t.function(t.variableName)], color: '#56c8d8' }, |
| 26 | + { tag: [t.labelName], color: '#cf6edf' }, |
| 27 | + { |
| 28 | + tag: [t.color, t.constant(t.name), t.standard(t.name)], |
| 29 | + color: '#facf4e', |
| 30 | + }, |
| 31 | + { tag: [t.definition(t.name), t.separator], color: '#fa5788' }, |
| 32 | + { tag: [t.brace], color: '#cf6edf' }, |
| 33 | + { |
| 34 | + tag: [t.annotation], |
| 35 | + color: '#ff5f52', |
| 36 | + }, |
| 37 | + { |
| 38 | + tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], |
| 39 | + color: '#ffad42', |
| 40 | + }, |
| 41 | + { |
| 42 | + tag: [t.typeName, t.className], |
| 43 | + color: '#ffad42', |
| 44 | + }, |
| 45 | + { |
| 46 | + tag: [t.operator, t.operatorKeyword], |
| 47 | + color: '#7186f0', |
| 48 | + }, |
| 49 | + { |
| 50 | + tag: [t.tagName], |
| 51 | + color: '#99d066', |
| 52 | + }, |
| 53 | + { |
| 54 | + tag: [t.squareBracket], |
| 55 | + color: '#ff5f52', |
| 56 | + }, |
| 57 | + { |
| 58 | + tag: [t.angleBracket], |
| 59 | + color: '#606f7a', |
| 60 | + }, |
| 61 | + { |
| 62 | + tag: [t.attributeName], |
| 63 | + color: '#bdbdbd', |
| 64 | + }, |
| 65 | + { |
| 66 | + tag: [t.regexp], |
| 67 | + color: '#ff5f52', |
| 68 | + }, |
| 69 | + { |
| 70 | + tag: [t.quote], |
| 71 | + color: '#6abf69', |
| 72 | + }, |
| 73 | + { tag: [t.string], color: '#99d066' }, |
| 74 | + { |
| 75 | + tag: t.link, |
| 76 | + color: '#56c8d8', |
| 77 | + textDecoration: 'underline', |
| 78 | + textUnderlinePosition: 'under', |
| 79 | + }, |
| 80 | + { |
| 81 | + tag: [t.url, t.escape, t.special(t.string)], |
| 82 | + color: '#facf4e', |
| 83 | + }, |
| 84 | + { tag: [t.meta], color: '#707d8b' }, |
| 85 | + { tag: [t.comment], color: '#707d8b', fontStyle: 'italic' }, |
| 86 | + { tag: t.monospace, color: '#bdbdbd' }, |
| 87 | + { tag: t.strong, fontWeight: 'bold', color: '#ff5f52' }, |
| 88 | + { tag: t.emphasis, fontStyle: 'italic', color: '#99d066' }, |
| 89 | + { tag: t.strikethrough, textDecoration: 'line-through' }, |
| 90 | + { tag: t.heading, fontWeight: 'bold', color: '#facf4e' }, |
| 91 | + { tag: t.heading1, fontWeight: 'bold', color: '#facf4e' }, |
| 92 | + { |
| 93 | + tag: [t.heading2, t.heading3, t.heading4], |
| 94 | + fontWeight: 'bold', |
| 95 | + color: '#facf4e', |
| 96 | + }, |
| 97 | + { |
| 98 | + tag: [t.heading5, t.heading6], |
| 99 | + color: '#facf4e', |
| 100 | + }, |
| 101 | + { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#56c8d8' }, |
| 102 | + { |
| 103 | + tag: [t.processingInstruction, t.inserted], |
| 104 | + color: '#ff5f52', |
| 105 | + }, |
| 106 | + { |
| 107 | + tag: [t.contentSeparator], |
| 108 | + color: '#56c8d8', |
| 109 | + }, |
| 110 | + { tag: t.invalid, color: '#606f7a', borderBottom: `1px dotted #ff5f52` }, |
| 111 | + ], |
| 112 | +}); |
0 commit comments