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