1import { tags as t } from '@lezer/highlight'; 2import { createTheme } from './theme-helper.mjs'; 3 4export const settings = { 5 background: '#002b36', 6 lineBackground: '#002b3699', 7 foreground: '#93a1a1', 8 muted: '#93a1a150', 9 caret: '#839496', 10 selection: '#173541', 11 selectionMatch: '#aafe661a', 12 gutterBackground: '#00252f', 13 gutterForeground: '#839496', 14 lineHighlight: '#173541', 15}; 16 17const c = { 18 background: '#002B36', 19 foreground: '#839496', 20 selection: '#004454AA', 21 selectionMatch: '#005A6FAA', 22 cursor: '#D30102', 23 dropdownBackground: '#00212B', 24 dropdownBorder: '#2AA19899', 25 activeLine: '#00cafe11', 26 matchingBracket: '#073642', 27 keyword: '#859900', 28 storage: '#93A1A1', 29 variable: '#268BD2', 30 parameter: '#268BD2', 31 function: '#268BD2', 32 string: '#2AA198', 33 constant: '#CB4B16', 34 type: '#859900', 35 class: '#268BD2', 36 number: '#D33682', 37 comment: '#586E75', 38 heading: '#268BD2', 39 invalid: '#DC322F', 40 regexp: '#DC322F', 41 tag: '#268BD2', 42}; 43 44export default createTheme({ 45 theme: 'dark', 46 settings: { 47 background: c.background, 48 foreground: c.foreground, 49 muted: c.muted, 50 caret: c.cursor, 51 selection: c.selection, 52 selectionMatch: c.selection, 53 gutterBackground: c.background, 54 gutterForeground: c.foreground, 55 gutterBorder: 'transparent', 56 lineHighlight: c.activeLine, 57 }, 58 styles: [ 59 { tag: t.keyword, color: c.keyword }, 60 { tag: [t.name, t.deleted, t.character, t.macroName], color: c.variable }, 61 { tag: [t.propertyName], color: c.function }, 62 { tag: [t.processingInstruction, t.string, t.inserted, t.special(t.string)], color: c.string }, 63 { tag: [t.function(t.variableName), t.labelName], color: c.function }, 64 { tag: [t.color, t.constant(t.name), t.standard(t.name)], color: c.constant }, 65 { tag: [t.definition(t.name), t.separator], color: c.variable }, 66 { tag: [t.className], color: c.class }, 67 { tag: [t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace], color: c.number }, 68 { tag: [t.typeName], color: c.type, fontStyle: c.type }, 69 { tag: [t.operator, t.operatorKeyword], color: c.keyword }, 70 { tag: [t.url, t.escape, t.regexp, t.link], color: c.regexp }, 71 { tag: [t.meta, t.comment], color: c.comment }, 72 { tag: t.tagName, color: c.tag }, 73 { tag: t.strong, fontWeight: 'bold' }, 74 { tag: t.emphasis, fontStyle: 'italic' }, 75 { tag: t.link, textDecoration: 'underline' }, 76 { tag: t.heading, fontWeight: 'bold', color: c.heading }, 77 { tag: [t.atom, t.bool, t.special(t.variableName)], color: c.variable }, 78 { tag: t.invalid, color: c.invalid }, 79 { tag: t.strikethrough, textDecoration: 'line-through' }, 80 ], 81});