Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit c705687

Browse files
author
Rusty Key
committed
tweak options format
1 parent 690f2a4 commit c705687

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/client/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ErrorHandler {
3737

3838
export async function launch(context: vscode.ExtensionContext): Promise<void> {
3939
const isEasyProject = await isEsyProject();
40-
return launchMerlinLsp(context, isEasyProject);
40+
return launchMerlinLsp(context, { useEsy: isEasyProject });
4141
}
4242

4343
async function isEsyProject() {
@@ -73,15 +73,15 @@ async function isEsyProject() {
7373
return false;
7474
}
7575

76-
function getMerlinLspOptions(useEsy: boolean) {
76+
function getMerlinLspOptions(options: { useEsy: boolean }) {
7777
const reasonConfig = vscode.workspace.getConfiguration("reason");
7878
let ocamlmerlinLsp = reasonConfig.get<string | null>("path.ocamlmerlin-lsp", null);
7979
if (ocamlmerlinLsp == null) {
8080
ocamlmerlinLsp = isWin ? "ocamlmerlin-lsp.exe" : "ocamlmerlin-lsp";
8181
}
8282

8383
let run;
84-
if (useEsy) {
84+
if (options.useEsy) {
8585
run = {
8686
args: ["exec-command", "--include-current-env", ocamlmerlinLsp],
8787
command: process.platform === "win32" ? "esy.cmd" : "esy",
@@ -118,8 +118,8 @@ function getMerlinLspOptions(useEsy: boolean) {
118118
return serverOptions;
119119
}
120120

121-
export async function launchMerlinLsp(context: vscode.ExtensionContext, useEsy: boolean): Promise<void> {
122-
const serverOptions = getMerlinLspOptions(useEsy);
121+
export async function launchMerlinLsp(context: vscode.ExtensionContext, options: { useEsy: boolean }): Promise<void> {
122+
const serverOptions = getMerlinLspOptions(options);
123123
const reasonConfig = vscode.workspace.getConfiguration("reason");
124124

125125
const languages = reasonConfig.get<string[]>("server.languages", ["ocaml", "reason"]);

0 commit comments

Comments
 (0)