Skip to content

Commit

Permalink
Fix code for launching the LSP in VSCode platform
Browse files Browse the repository at this point in the history
  • Loading branch information
nberth committed Sep 19, 2023
1 parent 84d4e63 commit 22569c4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/vscode/superbol-vscode-platform/superbol_languageclient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
(* *)
(**************************************************************************)

let command =
Vscode.Workspace.getConfiguration ()
|> Vscode.WorkspaceConfiguration.get ~section:"superbol.path"
|> function Some o -> Ojs.string_of_js o
| None -> "superbol"
let config = Vscode.Workspace.getConfiguration ()

let args = ["x-lsp"]

let serverOptions = Vscode_languageclient.ServerOptions.create
let serverOptions =
let command =
match Vscode.WorkspaceConfiguration.get ~section:"superbol.path" config with
| Some o -> Ojs.string_of_js o
| None -> "superbol-free"
in
Vscode_languageclient.ServerOptions.create ()
~command
~args
()

let documentSelector =
[| `Filter (Vscode_languageclient.DocumentFilter.createLanguage ~language:"cobol" ()) |]

let clientOptions = Vscode_languageclient.ClientOptions.create ~documentSelector ()
~args:["lsp"]

let clientOptions =
Vscode_languageclient.ClientOptions.create ()
~documentSelector:[|
`Filter (Vscode_languageclient.DocumentFilter.createLanguage ()
~language:"cobol");
|]

0 comments on commit 22569c4

Please sign in to comment.