aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-02-04 22:41:05 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-02-04 22:41:05 +0100
commitcd9689c6efe45b1ce98194d7f747b3998978045a (patch)
tree23d76c153bea42ae54d4d7ca86f2d4ec7f9680ac
parent0a102a93716d85d7a1c3ef280761d615cfdd738b (diff)
downloadplanetwars.dev-cd9689c6efe45b1ce98194d7f747b3998978045a.tar.xz
planetwars.dev-cd9689c6efe45b1ce98194d7f747b3998978045a.zip
configure python mode and theme for ace editor
-rw-r--r--web/pw-server/src/routes/index.svelte6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/pw-server/src/routes/index.svelte b/web/pw-server/src/routes/index.svelte
index 0db994c..39afe01 100644
--- a/web/pw-server/src/routes/index.svelte
+++ b/web/pw-server/src/routes/index.svelte
@@ -7,6 +7,12 @@
onMount(async () => {
const ace = await import("ace-builds");
editor = ace.edit("editor");
+
+ const python_mode = await import("ace-builds/src-noconflict/mode-python");
+ editor.getSession().setMode(new python_mode.Mode());
+
+ const gh_theme = await import ("ace-builds/src-noconflict/theme-github");
+ editor.setTheme(gh_theme);
});
async function submitCode() {