0

I'm creating a vscode extension (client language) which communicates with my own language server (LP) which is written by OCaml using the Language server protocol. Based on the lsp sample provided by vscode documentation, which I wasn't able to adapt to my case (server written in OCaml 'lsp-base.ml') what should I have for those lines of code:

let serverModule = context.asAbsolutePath(path.join('server', 'out', 'server.js'));

is it?

let serverModule = context.asAbsolutePath(path.join('XXX', 'XXXX', 'lsp-base.ml'));
Gama11
  • 31,714
  • 9
  • 78
  • 100
  • Nope. That example loads JavaScript https://github.com/microsoft/vscode-extension-samples/blob/master/lsp-sample/client/src/extension.ts#L21, while your OCaml code may require extra code. I have an example to initialize a C# language server, https://github.com/vscode-restructuredtext/vscode-restructuredtext/blob/master/src/rstLsp/extension.ts – Lex Li Jul 11 '19 at 02:40
  • thank you for your reply, i see that. What is the idea behind the serverModule so that i can add this extra code because the sample does not help me a lot. – Houda Mouzoun Jul 11 '19 at 11:14
  • You just need to make sure that correct `command` values are passed to `ServerOptions`, so that your language server can be launched by VSCode. – Lex Li Jul 11 '19 at 14:28

0 Answers0