Skip to content

Commit 607cebe

Browse files
committed
src/welcome: add note about removing go.useLanguageServer setting
Change-Id: I05314faf26b70b4f34099027c5d43edea7ccb4a7 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286437 Trust: Rebecca Stambler <[email protected]> Run-TryBot: Rebecca Stambler <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent d762a13 commit 607cebe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/welcome.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// https://github.com/microsoft/vscode-extension-samples/tree/master/webview-sample
88

99
import vscode = require('vscode');
10+
import { getGoConfig } from './config';
1011
import { extensionId } from './const';
1112

1213
export class WelcomePanel {
@@ -123,6 +124,14 @@ export class WelcomePanel {
123124
// Use a nonce to only allow specific scripts to be run
124125
const nonce = getNonce();
125126

127+
// Add an extra note if the user has already disabled gopls, asking
128+
// them to enable it.
129+
let alreadyDisabledGopls = '';
130+
if (getGoConfig()?.get('useLanguageServer') === false) {
131+
alreadyDisabledGopls = `If you previously disabled gopls through the "go.useLanguageServer"
132+
setting, we recommend removing that setting now.`;
133+
}
134+
126135
return `<!DOCTYPE html>
127136
<html lang="en">
128137
<head>
@@ -161,7 +170,7 @@ export class WelcomePanel {
161170
Heads up! Gopls, the official Go language server, is now enabled in VS Code by default.
162171
Gopls replaces several legacy tools to provide IDE features while editing Go code.
163172
See <a href="https://github.com/golang/vscode-go/issues/1037">issue 1037</a> for more
164-
information.
173+
information. ${alreadyDisabledGopls}
165174
</p>
166175
</div>
167176

0 commit comments

Comments
 (0)