From d8333230d2cac81aeb952a4d51e2fd2b06e0a472 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 27 Nov 2023 13:10:12 -0500 Subject: [PATCH] package.json: remove 'workspaceContains' from activation events It's not too late to start the work when a Go file is open. Go became popular so it's not uncommon to see a large repo that contains some go files. Also activate it if go.sum or go template files are open. onLanguage:go.mod and onLanguage:go.work are unnecessary according to vscode's diagnostics - the existence of language contribution config makes vscode auto-handle the activation. Fixes golang/vscode-go#3038 Fixes golang/vscode-go#2164 Change-Id: I3ca55316b00cbe7fc82ed01be65cce83d88b9053 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/545136 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley Auto-Submit: Hyang-Ah Hana Kim --- package.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9a80b3481b..7cd9465678 100644 --- a/package.json +++ b/package.json @@ -95,9 +95,8 @@ }, "activationEvents": [ "onLanguage:go", - "workspaceContains:*.go", - "workspaceContains:*/*.go", - "workspaceContains:*/*/*.go", + "onLanguage:go.sum", + "onLanguage:gotmpl", "onDebugInitialConfigurations", "onDebugResolve:go", "onWebviewPanel:welcomeGo" @@ -132,8 +131,7 @@ { "id": "go.mod", "filenames": [ - "go.mod", - "gopls.mod" + "go.mod" ], "aliases": [ "Go Module File"