1import { tags as t } from '@lezer/highlight'; 2import { createTheme } from './theme-helper.mjs'; 3 4export const settings = { 5 background: '#ffffff', 6 lineBackground: '#ffffff50', 7 foreground: '#383a42', 8 muted: '#383a4250', 9 caret: '#000', 10 selection: '#add6ff', 11 selectionMatch: '#a8ac94', 12 lineHighlight: '#99999926', 13 gutterBackground: '#fff', 14 gutterForeground: '#237893', 15 gutterActiveForeground: '#0b216f', 16 fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace', 17}; 18 19export default createTheme({ 20 theme: 'light', 21 settings: { 22 background: '#ffffff', 23 foreground: '#383a42', 24 muted: '#383a4250', 25 caret: '#000', 26 selection: '#add6ff', 27 selectionMatch: '#a8ac94', 28 lineHighlight: '#99999926', 29 gutterBackground: '#fff', 30 gutterForeground: '#237893', 31 gutterActiveForeground: '#0b216f', 32 fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace', 33 }, 34 styles: [ 35 { 36 tag: [ 37 t.keyword, 38 t.operatorKeyword, 39 t.modifier, 40 t.color, 41 t.constant(t.name), 42 t.standard(t.name), 43 t.standard(t.tagName), 44 t.special(t.brace), 45 t.atom, 46 t.bool, 47 t.special(t.variableName), 48 ], 49 color: '#0000ff', 50 }, 51 { tag: [t.moduleKeyword, t.controlKeyword], color: '#af00db' }, 52 { 53 tag: [ 54 t.name, 55 t.deleted, 56 t.character, 57 t.macroName, 58 t.propertyName, 59 t.variableName, 60 t.labelName, 61 t.definition(t.name), 62 ], 63 color: '#0070c1', 64 }, 65 { tag: t.heading, fontWeight: 'bold', color: '#0070c1' }, 66 { 67 tag: [t.typeName, t.className, t.tagName, t.number, t.changed, t.annotation, t.self, t.namespace], 68 color: '#267f99', 69 }, 70 { tag: [t.function(t.variableName), t.function(t.propertyName)], color: '#795e26' }, 71 { tag: [t.number], color: '#098658' }, 72 { tag: [t.operator, t.punctuation, t.separator, t.url, t.escape, t.regexp], color: '#383a42' }, 73 { tag: [t.regexp], color: '#af00db' }, 74 { tag: [t.special(t.string), t.processingInstruction, t.string, t.inserted], color: '#a31515' }, 75 { tag: [t.angleBracket], color: '#383a42' }, 76 { tag: t.strong, fontWeight: 'bold' }, 77 { tag: t.emphasis, fontStyle: 'italic' }, 78 { tag: t.strikethrough, textDecoration: 'line-through' }, 79 { tag: [t.meta, t.comment], color: '#008000' }, 80 { tag: t.link, color: '#4078f2', textDecoration: 'underline' }, 81 { tag: t.invalid, color: '#e45649' }, 82 ], 83});