Skip to content

Commit 8232a6d

Browse files
committed
format
1 parent a8ca9d8 commit 8232a6d

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

.ocamlformat-ignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ analysis/vendor/ext/map.cppo.ml
1313
analysis/vendor/ext/ordered_hash_map.cppo.ml
1414
analysis/vendor/ext/set.cppo.ml
1515
analysis/vendor/ext/vec.cppo.ml
16-
**/node_modules/**
16+
**/node_modules/**

client/src/extension.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
ServerOptions,
2424
State,
2525
TransportKind,
26-
DidChangeConfigurationNotification
26+
DidChangeConfigurationNotification,
2727
} from "vscode-languageclient/node";
2828

2929
import * as customCommands from "./commands";
@@ -91,7 +91,9 @@ export function activate(context: ExtensionContext) {
9191
"rescript",
9292
);
9393

94-
const useExperimentalServer = workspace.getConfiguration("rescript").get<boolean>("useExperimentalServer", false);
94+
const useExperimentalServer = workspace
95+
.getConfiguration("rescript")
96+
.get<boolean>("useExperimentalServer", false);
9597

9698
function createExperimentalLanguageClient() {
9799
const binaryPathFromNodeModules = Uri.joinPath(
@@ -101,9 +103,13 @@ export function activate(context: ExtensionContext) {
101103
"rescript-language-server",
102104
).fsPath;
103105

104-
const userServerPath = workspace.getConfiguration("rescript").get<string | null>("experimentalServerPath", null);
106+
const userServerPath = workspace
107+
.getConfiguration("rescript")
108+
.get<string | null>("experimentalServerPath", null);
105109

106-
const binaryPath = userServerPath ? userServerPath : binaryPathFromNodeModules;
110+
const binaryPath = userServerPath
111+
? userServerPath
112+
: binaryPathFromNodeModules;
107113

108114
let serverOptions: ServerOptions = {
109115
run: {
@@ -242,7 +248,9 @@ export function activate(context: ExtensionContext) {
242248
}
243249

244250
// Create the language client and start the client.
245-
client = useExperimentalServer ? createExperimentalLanguageClient(): createLanguageClient();
251+
client = useExperimentalServer
252+
? createExperimentalLanguageClient()
253+
: createLanguageClient();
246254

247255
// Create a custom diagnostics collection, for cases where we want to report
248256
// diagnostics programatically from inside of the extension. The reason this
@@ -583,7 +591,9 @@ export function activate(context: ExtensionContext) {
583591

584592
commands.registerCommand("rescript-vscode.restart_language_server", () => {
585593
client.stop().then(() => {
586-
client = useExperimentalServer ? createExperimentalLanguageClient(): createLanguageClient();;
594+
client = useExperimentalServer
595+
? createExperimentalLanguageClient()
596+
: createLanguageClient();
587597
client.start();
588598
});
589599
});

0 commit comments

Comments
 (0)