import { startLanguageServer as startLanguim } from "langium/lsp";
import { BrowserMessageReader, BrowserMessageWriter, createConnection } from "vscode-languageserver/browser";
import { createLanguageServices } from "./module.js";
export { logger as lspLogger, setLogLevel } from "./logger.js";
export { createCustomLanguageServices, createLanguageServices, LikeC4Module } from "./module.js";
export function startLanguageServer() {
  const messageReader = new BrowserMessageReader(self);
  const messageWriter = new BrowserMessageWriter(self);
  const connection = createConnection(messageReader, messageWriter);
  const services = createLanguageServices({ connection });
  startLanguim(services.shared);
  return services;
}
