From cd9689c6efe45b1ce98194d7f747b3998978045a Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Fri, 4 Feb 2022 22:41:05 +0100
Subject: configure python mode and theme for ace editor

---
 web/pw-server/src/routes/index.svelte | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'web/pw-server/src/routes/index.svelte')

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() {
-- 
cgit v1.2.3

