jevstrudel.git / packages / codemirror / themes / vscodeDark.mjs
1import { tags as t } from '@lezer/highlight';
2import { createTheme } from './theme-helper.mjs';
3
4export const settings = {
5  background: '#1e1e1e',
6  lineBackground: '#1e1e1e99',
7  foreground: '#fff',
8  muted: '#ffffff50',
9  caret: '#c6c6c6',
10  selection: '#6199ff2f',
11  selectionMatch: '#72a1ff59',
12  lineHighlight: '#ffffff0f',
13  gutterBackground: '#1e1e1e',
14  gutterForeground: '#838383',
15  gutterActiveForeground: '#fff',
16};
17
18export default createTheme({
19  theme: 'dark',
20  settings: {
21    background: '#1e1e1e',
22    foreground: '#fff',
23    muted: '#ffffff50',
24    caret: '#c6c6c6',
25    selection: '#6199ff2f',
26    selectionMatch: '#72a1ff59',
27    lineHighlight: '#ffffff0f',
28    gutterBackground: '#1e1e1e',
29    gutterForeground: '#838383',
30    gutterActiveForeground: '#fff',
31    fontFamily: 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
32  },
33  styles: [
34    {
35      tag: [
36        t.keyword,
37        t.operatorKeyword,
38        t.modifier,
39        t.color,
40        t.constant(t.name),
41        t.standard(t.name),
42        t.standard(t.tagName),
43        t.special(t.brace),
44        t.atom,
45        t.bool,
46        t.special(t.variableName),
47      ],
48      color: '#569cd6',
49    },
50    { tag: [t.controlKeyword, t.moduleKeyword], color: '#c586c0' },
51    {
52      tag: [
53        t.name,
54        t.deleted,
55        t.character,
56        t.macroName,
57        t.propertyName,
58        t.variableName,
59        t.labelName,
60        t.definition(t.name),
61      ],
62      color: '#9cdcfe',
63    },
64    { tag: t.heading, fontWeight: 'bold', color: '#9cdcfe' },
65    {
66      tag: [t.typeName, t.className, t.tagName, t.number, t.changed, t.annotation, t.self, t.namespace],
67      color: '#4ec9b0',
68    },
69    { tag: [t.function(t.variableName), t.function(t.propertyName)], color: '#dcdcaa' },
70    { tag: [t.number], color: '#b5cea8' },
71    { tag: [t.operator, t.punctuation, t.separator, t.url, t.escape, t.regexp], color: '#d4d4d4' },
72    { tag: [t.regexp], color: '#d16969' },
73    { tag: [t.special(t.string), t.processingInstruction, t.string, t.inserted], color: '#ce9178' },
74    { tag: [t.angleBracket], color: '#808080' },
75    { tag: t.strong, fontWeight: 'bold' },
76    { tag: t.emphasis, fontStyle: 'italic' },
77    { tag: t.strikethrough, textDecoration: 'line-through' },
78    { tag: [t.meta, t.comment], color: '#6a9955' },
79    { tag: t.link, color: '#6a9955', textDecoration: 'underline' },
80    { tag: t.invalid, color: '#ff0000' },
81  ],
82});