import * as aceBuilds from 'https://esm.run/ace-builds';

import ace from 'https://cdn.jsdelivr.net/npm/ace/+esm'

/* import 'ace-builds/src-noconflict/mode-javascript';
import 'ace-builds/src-noconflict/theme-chrome'; */

/* import {AceLanguageClient} from "ace-linters/build/ace-language-client";

const serverData = {
    module: () => import("ace-linters/build/language-client"),
    modes: "json|json5",
    type: "socket",
    socket: new WebSocket("ws://127.0.0.1:3000/ws/lsp"), // your websocket server address
}
 */
 // Initialize the editor
 const editor = ace.edit("editor", {
    theme: "ace/theme/chrome",
    mode: "ace/mode/javascript",
    fontSize: "14px",
    showPrintMargin: false,
    useWorker: false // Disable web worker for this simple demo
});

// Create a language provider for WebSocket
//let languageProvider = AceLanguageClient.for(serverData);
//languageProvider.registerEditor(editor);