From 914b06ec88274bf944decf4e0df41b942033df54 Mon Sep 17 00:00:00 2001
From: Dexalt142 <31777261+Dexalt142@users.noreply.github.com>
Date: Tue, 4 Jan 2022 18:39:09 +0700
Subject: [PATCH] feat (editor theme): atom one dark theme
---
src/ScriptEditor/ui/OptionsModal.tsx | 1 +
src/ScriptEditor/ui/themes.ts | 91 ++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
diff --git a/src/ScriptEditor/ui/OptionsModal.tsx b/src/ScriptEditor/ui/OptionsModal.tsx
index 7a443ceba..94d63f1ab 100644
--- a/src/ScriptEditor/ui/OptionsModal.tsx
+++ b/src/ScriptEditor/ui/OptionsModal.tsx
@@ -50,6 +50,7 @@ export function OptionsModal(props: IProps): React.ReactElement {
+
diff --git a/src/ScriptEditor/ui/themes.ts b/src/ScriptEditor/ui/themes.ts
index 9684c04cc..943b94ccb 100644
--- a/src/ScriptEditor/ui/themes.ts
+++ b/src/ScriptEditor/ui/themes.ts
@@ -218,6 +218,7 @@ export async function loadThemes(monaco: { editor: any }): Promise {
"editor.selectionHighlightBorder": "#073642",
},
});
+
monaco.editor.defineTheme("dracula", {
base: "vs-dark",
inherit: true,
@@ -313,4 +314,94 @@ export async function loadThemes(monaco: { editor: any }): Promise {
"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",
+ }
+ });
}