From 3139bb0bc7a0d2fef957f487da1f7f517cf6d989 Mon Sep 17 00:00:00 2001 From: Aunn Date: Tue, 10 Feb 2026 18:01:14 -0800 Subject: [PATCH 1/3] Implement java --- src/lib/components/editor/monaco/utils.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib/components/editor/monaco/utils.ts b/src/lib/components/editor/monaco/utils.ts index 050bcb71..4f19b34d 100644 --- a/src/lib/components/editor/monaco/utils.ts +++ b/src/lib/components/editor/monaco/utils.ts @@ -13,15 +13,17 @@ export const getMonacoWrapperConfig = ( compilerOptions?: string, editorOptions?: monaco.editor.IStandaloneEditorConstructionOptions ): WrapperConfig => { - let lspUrl = undefined; - if (language === 'cpp' || language === 'py') { - lspUrl = `wss://thecodingwizard--lsp-server-main.modal.run:443/${ - language === 'cpp' ? 'clangd' : 'pyright' - }`; - if (compilerOptions) { - lspUrl += `?compiler_options=${encodeURIComponent(compilerOptions)}`; - } + let lspUrl = `wss://thecodingwizard--lsp-server-main.modal.run:443/${ + language === 'cpp' + ? 'clangd' + : language === 'java' + ? 'jdtls' + : 'pyright' + }`; + + if (compilerOptions) { + lspUrl += `?compiler_options=${encodeURIComponent(compilerOptions)}`; } const monacoLanguage = language === 'py' ? 'python' : language; @@ -80,7 +82,7 @@ export const getMonacoWrapperConfig = ( editorOptions, codeResources: { modified: { - uri: `/workspace/main.${language}`, + uri: language === 'java' ? 'file:///workspace/main.java' : `/workspace/main.${language}`, text: '' } } From 0d63ec34ed2ce73feb70cd5553f54ba88bedfa0f Mon Sep 17 00:00:00 2001 From: Aunn Date: Tue, 17 Feb 2026 21:24:32 -0800 Subject: [PATCH 2/3] Add duel url support Note: the url is my best guess of what it would be, however I have no way of checking this on my end. @thecodingwizard since it seems like its your account, can you please fact check these urls when you host the lsp code? --- src/lib/components/editor/monaco/utils.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/components/editor/monaco/utils.ts b/src/lib/components/editor/monaco/utils.ts index 4f19b34d..03b799af 100644 --- a/src/lib/components/editor/monaco/utils.ts +++ b/src/lib/components/editor/monaco/utils.ts @@ -14,13 +14,12 @@ export const getMonacoWrapperConfig = ( editorOptions?: monaco.editor.IStandaloneEditorConstructionOptions ): WrapperConfig => { - let lspUrl = `wss://thecodingwizard--lsp-server-main.modal.run:443/${ - language === 'cpp' - ? 'clangd' - : language === 'java' - ? 'jdtls' - : 'pyright' - }`; + let lspUrl = + language === 'java' + ? `wss://thecodingwizard--lsp-server-jdtls.modal.run:443/jdtls` + : `wss://thecodingwizard--lsp-server-main.modal.run:443/${ + language === 'cpp' ? 'clangd' : 'pyright' + }`; if (compilerOptions) { lspUrl += `?compiler_options=${encodeURIComponent(compilerOptions)}`; From 6ff3fd51a0f904f14767d1ec31bff865d72de103 Mon Sep 17 00:00:00 2001 From: Aunn Date: Sat, 14 Mar 2026 12:04:34 -0700 Subject: [PATCH 3/3] Revert to single url system --- src/lib/components/editor/monaco/utils.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/components/editor/monaco/utils.ts b/src/lib/components/editor/monaco/utils.ts index 03b799af..72618247 100644 --- a/src/lib/components/editor/monaco/utils.ts +++ b/src/lib/components/editor/monaco/utils.ts @@ -14,12 +14,11 @@ export const getMonacoWrapperConfig = ( editorOptions?: monaco.editor.IStandaloneEditorConstructionOptions ): WrapperConfig => { - let lspUrl = - language === 'java' - ? `wss://thecodingwizard--lsp-server-jdtls.modal.run:443/jdtls` - : `wss://thecodingwizard--lsp-server-main.modal.run:443/${ - language === 'cpp' ? 'clangd' : 'pyright' - }`; + let lspUrl = `wss://thecodingwizard--lsp-server-main.modal:443/${ + language === "java" ? "jdtls" : + language === "cpp" ? "clangd" : + "pyright" + }`; if (compilerOptions) { lspUrl += `?compiler_options=${encodeURIComponent(compilerOptions)}`;