vscode / LSP:如何将客户端(打字稿)与服务器连接(使用Ocaml实现)

时间:2019-07-09 09:26:09

标签: vscode-extensions language-server-protocol

我正在设置使用OCaml语言实现的新服务器,我想创建一个vscode扩展的客户端。在查看vscode文档中的LSP示例之后,我找到了用extension.ts(客户端)编写的代码行,但是我不知道如何使它适应我的情况:

********************代码**************************

// The server is implemented in node
  let serverModule = context.asAbsolutePath(path.join('server', 'out', 'server.js'));
  // The debug options for the server
  // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging
  let debugOptions = { execArgv: ['--nolazy', '--inspect=6009'] };

  // If the extension is launched in debug mode then the debug server options are used
  // Otherwise the run options are used
  let serverOptions: ServerOptions = {
    run: { module: serverModule, transport: TransportKind.ipc },
    debug: {
      module: serverModule,
      transport: TransportKind.ipc,
      options: debugOptions
    }
  };

0 个答案:

没有答案