[release] all: merge master@b665d37

b665d37 src/goLanguageServer: remove gopls start progress bar

Change-Id: Icb2c05a1734c592a81e523960e92dae27bfd0611
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();
 }