feat (editor theme): atom one dark theme

This commit is contained in:
Dexalt142 2022-01-04 18:39:09 +07:00
parent d5561abd46
commit 914b06ec88
2 changed files with 92 additions and 0 deletions

@ -50,6 +50,7 @@ export function OptionsModal(props: IProps): React.ReactElement {
<MenuItem value="vs-dark">dark</MenuItem>
<MenuItem value="light">light</MenuItem>
<MenuItem value="dracula">dracula</MenuItem>
<MenuItem value="one-dark">one-dark</MenuItem>
</Select>
</Box>

@ -218,6 +218,7 @@ export async function loadThemes(monaco: { editor: any }): Promise<void> {
"editor.selectionHighlightBorder": "#073642",
},
});
monaco.editor.defineTheme("dracula", {
base: "vs-dark",
inherit: true,
@ -313,4 +314,94 @@ export async function loadThemes(monaco: { editor: any }): Promise<void> {
"editor.snippetFinalTabstopHighlightBorder": "#50FA7B",
},
});
monaco.editor.defineTheme("one-dark", {
base: "vs-dark",
inherit: true,
rules: [
{
token: "",
background: "333842",
foreground: "ABB2BF",
},
{
token: "comment",
foreground: "5C6370",
},
{
token: "string",
foreground: "98C379",
},
{
token: "number",
foreground: "D19A66",
},
{
token: "function",
foreground: "C678DD",
},
{
token: "keyword",
foreground: "C678DD",
},
{
token: "otherkeyvars",
foreground: "D19A66",
},
{
token: "otherkeywords",
foreground: "C678DD",
},
{
token: "ns",
foreground: "E06C75",
},
{
token: "netscriptfunction",
foreground: "61AFEF",
},
{
token: "type.identifier",
foreground: "E5C07B",
},
{
token: "delimiter",
foreground: "ABB2BF",
},
{
token: "this",
foreground: "E06C75",
},
],
colors: {
"editor.background": "#282C34",
"editor.foreground": "#ABB2BF",
"editor.lineHighlightBackground": "#99BBFF0A",
"editor.selectionBackground": "#3E4451",
"editor.findMatchHighlightBackground": "#528BFF3D",
"editorCursor.foreground": "#528BFF",
"editorHoverWidget.background": "#21252B",
"editorHoverWidget.border": "#181A1F",
"editorIndentGuide.background": "#ABB2BF26",
"editorIndentGuide.activeBackground": "#626772",
"editorLineNumber.foreground": "#636D83",
"editorLineNumber.activeForeground": "#ABB2BF",
"editorSuggestWidget.background": "#21252B",
"editorSuggestWidget.border": "#181A1F",
"editorSuggestWidget.selectedBackground": "#2C313A",
"editorWhitespace.foreground": "#ABB2BF26",
"editorWidget.background": "#21252B",
"editorWidget.border": "#3A3F4B",
"input.background": "#1B1D23",
"input.border": "#181A1F",
"peekView.border": "#528BFF",
"peekViewResult.background": "#21252B",
"peekViewResult.selectionBackground": "#2C313A",
"peekViewTitle.background": "#1B1D23",
"peekViewEditor.background": "#1B1D23",
"scrollbarSlider.background": "#4E566680",
"scrollbarSlider.activeBackground": "#747D9180",
"scrollbarSlider.hoverBackground": "#5A637580",
}
});
}