Skip to content

Commit

Permalink
src/welcome: add note about removing go.useLanguageServer setting
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stamblerre committed Jan 26, 2021
1 parent d762a13 commit 607cebe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// https://github.com/microsoft/vscode-extension-samples/tree/master/webview-sample

import vscode = require('vscode');
import { getGoConfig } from './config';
import { extensionId } from './const';

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

// Add an extra note if the user has already disabled gopls, asking
// them to enable it.
let alreadyDisabledGopls = '';
if (getGoConfig()?.get('useLanguageServer') === false) {
alreadyDisabledGopls = `If you previously disabled gopls through the "go.useLanguageServer"
setting, we recommend removing that setting now.`;
}

return `<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -161,7 +170,7 @@ export class WelcomePanel {
Heads up! Gopls, the official Go language server, is now enabled in VS Code by default.
Gopls replaces several legacy tools to provide IDE features while editing Go code.
See <a href="https://github.com/golang/vscode-go/issues/1037">issue 1037</a> for more
information.
information. ${alreadyDisabledGopls}
</p>
</div>
Expand Down

0 comments on commit 607cebe

Please sign in to comment.