diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-04 22:41:05 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-04 22:41:05 +0100 |
commit | cd9689c6efe45b1ce98194d7f747b3998978045a (patch) | |
tree | 23d76c153bea42ae54d4d7ca86f2d4ec7f9680ac /web/pw-server/src/routes/index.svelte | |
parent | 0a102a93716d85d7a1c3ef280761d615cfdd738b (diff) | |
download | planetwars.dev-cd9689c6efe45b1ce98194d7f747b3998978045a.tar.xz planetwars.dev-cd9689c6efe45b1ce98194d7f747b3998978045a.zip |
configure python mode and theme for ace editor
Diffstat (limited to 'web/pw-server/src/routes/index.svelte')
-rw-r--r-- | web/pw-server/src/routes/index.svelte | 6 |
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() { |