2021-04-21 01:34:17 +08:00
|
|
|
// This is a port of the One Dark theme to the Monaco editor.
|
|
|
|
|
2021-12-04 22:02:53 +08:00
|
|
|
const colors = {
|
|
|
|
default: "#abb2bf",
|
|
|
|
lightRed: "#e06c75",
|
|
|
|
blue: "#61afef",
|
2022-01-14 02:06:30 +08:00
|
|
|
gray: "#737a8c",
|
2021-12-04 22:02:53 +08:00
|
|
|
green: "#98c379",
|
|
|
|
purple: "#c678dd",
|
|
|
|
red: "#be5046",
|
|
|
|
teal: "#56b6c2",
|
|
|
|
peach: "#d19a66",
|
|
|
|
};
|
|
|
|
|
2021-04-21 01:34:17 +08:00
|
|
|
const theme = {
|
|
|
|
base: "vs-dark",
|
|
|
|
inherit: false,
|
|
|
|
rules: [
|
2021-12-04 22:02:53 +08:00
|
|
|
{ token: "", foreground: colors.default },
|
|
|
|
{ token: "variable", foreground: colors.lightRed },
|
|
|
|
{ token: "constant", foreground: colors.blue },
|
|
|
|
{ token: "constant.character.escape", foreground: colors.blue },
|
|
|
|
{ token: "comment", foreground: colors.gray },
|
|
|
|
{ token: "number", foreground: colors.blue },
|
|
|
|
{ token: "regexp", foreground: colors.lightRed },
|
|
|
|
{ token: "type", foreground: colors.lightRed },
|
|
|
|
{ token: "string", foreground: colors.green },
|
|
|
|
{ token: "keyword", foreground: colors.purple },
|
|
|
|
{ token: "operator", foreground: colors.peach },
|
|
|
|
{ token: "delimiter.bracket.embed", foreground: colors.red },
|
|
|
|
{ token: "sigil", foreground: colors.teal },
|
|
|
|
{ token: "function", foreground: colors.blue },
|
|
|
|
{ token: "function.call", foreground: colors.default },
|
2021-04-21 01:34:17 +08:00
|
|
|
|
|
|
|
// Markdown specific
|
|
|
|
{ token: "emphasis", fontStyle: "italic" },
|
|
|
|
{ token: "strong", fontStyle: "bold" },
|
2021-12-04 22:02:53 +08:00
|
|
|
{ token: "keyword.md", foreground: colors.lightRed },
|
|
|
|
{ token: "keyword.table", foreground: colors.lightRed },
|
|
|
|
{ token: "string.link.md", foreground: colors.blue },
|
|
|
|
{ token: "variable.md", foreground: colors.teal },
|
|
|
|
{ token: "string.md", foreground: colors.default },
|
|
|
|
{ token: "variable.source.md", foreground: colors.default },
|
|
|
|
|
|
|
|
// XML specific
|
|
|
|
{ token: "tag", foreground: colors.lightRed },
|
|
|
|
{ token: "metatag", foreground: colors.lightRed },
|
|
|
|
{ token: "attribute.name", foreground: colors.peach },
|
|
|
|
{ token: "attribute.value", foreground: colors.green },
|
|
|
|
|
|
|
|
// JSON specific
|
|
|
|
{ token: "string.key", foreground: colors.lightRed },
|
|
|
|
{ token: "keyword.json", foreground: colors.blue },
|
2021-04-21 01:34:17 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
colors: {
|
|
|
|
"editor.background": "#282c34",
|
2021-12-04 22:02:53 +08:00
|
|
|
"editor.foreground": colors.default,
|
2021-04-21 01:34:17 +08:00
|
|
|
"editorLineNumber.foreground": "#636d83",
|
|
|
|
"editorCursor.foreground": "#636d83",
|
|
|
|
"editor.selectionBackground": "#3e4451",
|
|
|
|
"editor.findMatchHighlightBackground": "#528bff3D",
|
|
|
|
"editorSuggestWidget.background": "#21252b",
|
|
|
|
"editorSuggestWidget.border": "#181a1f",
|
|
|
|
"editorSuggestWidget.selectedBackground": "#2c313a",
|
|
|
|
"input.background": "#1b1d23",
|
|
|
|
"input.border": "#181a1f",
|
2021-10-13 20:56:33 +08:00
|
|
|
"editorBracketMatch.border": "#282c34",
|
|
|
|
"editorBracketMatch.background": "#3e4451",
|
2021-04-21 01:34:17 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default theme;
|