Skip to content

Commit e471abb

Browse files
committed
Fix code for launching the LSP in VSCode platform
1 parent fb90be0 commit e471abb

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/vscode/superbol-vscode-platform/superbol_languageclient.ml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
(* *)
1313
(**************************************************************************)
1414

15-
let command =
16-
Vscode.Workspace.getConfiguration ()
17-
|> Vscode.WorkspaceConfiguration.get ~section:"superbol.path"
18-
|> function Some o -> Ojs.string_of_js o
19-
| None -> "superbol"
15+
let config = Vscode.Workspace.getConfiguration ()
2016

21-
let args = ["x-lsp"]
22-
23-
let serverOptions = Vscode_languageclient.ServerOptions.create
17+
let serverOptions =
18+
let command =
19+
match Vscode.WorkspaceConfiguration.get ~section:"superbol.path" config with
20+
| Some o -> Ojs.string_of_js o
21+
| None -> "superbol-free"
22+
in
23+
Vscode_languageclient.ServerOptions.create ()
2424
~command
25-
~args
26-
()
27-
28-
let documentSelector =
29-
[| `Filter (Vscode_languageclient.DocumentFilter.createLanguage ~language:"cobol" ()) |]
30-
31-
let clientOptions = Vscode_languageclient.ClientOptions.create ~documentSelector ()
25+
~args:["lsp"]
3226

27+
let clientOptions =
28+
Vscode_languageclient.ClientOptions.create ()
29+
~documentSelector:[|
30+
`Filter (Vscode_languageclient.DocumentFilter.createLanguage ()
31+
~language:"cobol");
32+
|]

0 commit comments

Comments
 (0)