Skip to content

Commit

Permalink
[release] src/goMain: linkify documentLink deprecation warning message
Browse files Browse the repository at this point in the history
vscode show*Message API does not have full markdown formatting support
but allows the use of links. Use it so users can access the info easily.

Change-Id: I4eff7c128bdf97ba4ff0375e957daa77ed4f9369
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288133
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
(cherry picked from commit bc53fd8ee162ef0595ec63bb33e23cfaed86bcaf)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288212
TryBot-Result: kokoro <[email protected]>
  • Loading branch information
hyangah committed Feb 1, 2021
1 parent 2f2f2a2 commit b5f15f5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/goMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ export async function activate(ctx: vscode.ExtensionContext) {
// The `diagnostics` setting is still used as a workaround for running custom vet.
if (experimentalFeatures['documentLink'] === false) {
vscode.window.showErrorMessage(`The 'go.languageServerExperimentalFeature.documentLink' setting is now deprecated.
Please use ' "gopls": {"ui.navigation.importShortcut": "Definition" }' instead.
See https://github.com/golang/vscode-go/blob/master/docs/settings.md#uinavigationimportshortcut for more details.`);
Please use '"gopls": {"ui.navigation.importShortcut": "Definition" }' instead.
See [the settings doc](https://github.com/golang/vscode-go/blob/master/docs/settings.md#uinavigationimportshortcut) for more details.`);
}
const promptKey = 'promptedLanguageServerExperimentalFeatureDeprecation';
const prompted = getFromGlobalState(promptKey, false);
if (!prompted && experimentalFeatures['diagnostics'] === false) {
const msg = `The 'go.languageServerExperimentalFeature.diagnostics' setting will be deprecated soon.
If you would like additional configuration for diagnostics from gopls, please see and response to
https://github.com/golang/vscode-go/issues/50.`;
If you would like additional configuration for diagnostics from gopls, please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50).`;
const selected = await vscode.window.showInformationMessage(msg, `Don't show again`);
switch (selected) {
case `Don't show again`:
Expand Down

0 comments on commit b5f15f5

Please sign in to comment.