src/goLanguageServer: remove gopls start progress bar

This was purely cosmetic, but conflicts with the other important
notification messages such as missing gopls warning messages.

And, use the exact comparison when checking 'go.useLanguageServer'.
This can be any value - users can enter arbitrary values by mistake.

Change-Id: Ie20c875e984dff00e1287774dd8b5da8d976b520
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286792
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index 914d158..9342205 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -143,46 +143,19 @@
 	}
 
 	languageServerStartInProgress = true;
-	const progressMsg = languageServerIsRunning ? 'Restarting language service' : 'Starting language service';
-	await vscode.window.withProgress({
-		title: progressMsg,
-		cancellable: !activation,
-		location: vscode.ProgressLocation.Notification,
-	}, async (progress, token) => {
-		let disposable: vscode.Disposable;
-		if (token) {
-			disposable = token.onCancellationRequested(async () => {
-				const choice = await vscode.window.showErrorMessage(
-					'Language service restart request was interrupted and language service may be in a bad state. ' +
-					'Please reload the window.',
-					'Reload Window');
-				if (choice === 'Reload Window') {
-					await vscode.commands.executeCommand('workbench.action.reloadWindow');
-				}
-			});
-		}
 
-		const started = await startLanguageServer(ctx, cfg);
+	const started = await startLanguageServer(ctx, cfg);
 
-		if (!started && goConfig['useLanguageServer'] === true) {
-			// We already created various notification - e.g. missing gopls, ...
-			// So, just leave a log message here instead of issuing one more notification.
-			outputChannel.appendLine(
-				`Failed to start the language server (gopls). Falling back to default language providers...`);
-			outputChannel.show();
-		}
-		// If the server has been disabled, or failed to start,
-		// fall back to the default providers, while making sure not to
-		// re-register any providers.
-		if (!started && defaultLanguageProviders.length === 0) {
-			registerDefaultProviders(ctx);
-		}
+	// If the server has been disabled, or failed to start,
+	// fall back to the default providers, while making sure not to
+	// re-register any providers.
+	if (!started && defaultLanguageProviders.length === 0) {
+		registerDefaultProviders(ctx);
+	}
 
-		if (disposable) { disposable.dispose(); }
-		languageServerIsRunning = started;
-		updateLanguageServerIconGoStatusBar(started, goConfig['useLanguageServer']);
-		languageServerStartInProgress = false;
-	});
+	languageServerIsRunning = started;
+	updateLanguageServerIconGoStatusBar(started, goConfig['useLanguageServer'] === true);
+	languageServerStartInProgress = false;
 }
 
 // scheduleGoplsSuggestions sets timeouts for the various gopls-specific
diff --git a/src/goStatus.ts b/src/goStatus.ts
index d3306ef..1c8f5cd 100644
--- a/src/goStatus.ts
+++ b/src/goStatus.ts
@@ -55,7 +55,7 @@
 		const goplsVersion = await getLocalGoplsVersion(cfg);
 		options.push({label: `${languageServerIcon}Open 'gopls' trace`, description: `${goplsVersion}`});
 	}
-	if (!languageServerIsRunning && !cfg.serverName && goConfig['useLanguageServer']) {
+	if (!languageServerIsRunning && !cfg.serverName && goConfig['useLanguageServer'] === true) {
 		options.push({
 			label: `Install Go Language Server`,
 			description: `${languageServerErrorIcon}'gopls' is required but missing`});
@@ -114,7 +114,7 @@
 	// icon will be updated on an attempt to start.
 	const goConfig = getGoConfig();
 	const cfg = buildLanguageServerConfig(goConfig);
-	updateLanguageServerIconGoStatusBar(languageServerIsRunning, goConfig['useLanguageServer']);
+	updateLanguageServerIconGoStatusBar(languageServerIsRunning, goConfig['useLanguageServer'] === true);
 
 	showGoStatusBar();
 }