@@ -23,7 +23,7 @@ import {
2323 ServerOptions ,
2424 State ,
2525 TransportKind ,
26- DidChangeConfigurationNotification
26+ DidChangeConfigurationNotification ,
2727} from "vscode-languageclient/node" ;
2828
2929import * 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