Skip to content

Commit d4e7483

Browse files
feat(vscode): defined workspaceContains pubspec.yaml activation event (#761)
Co-authored-by: Renan <[email protected]>
1 parent 5a5bb23 commit d4e7483

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

extensions/vscode/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"backend"
2828
],
2929
"icon": "assets/logo.png",
30-
"activationEvents": [],
30+
"activationEvents": [
31+
"workspaceContains:**/pubspec.yaml"
32+
],
3133
"main": "./out/extension.js",
3234
"contributes": {
3335
"commands": [

extensions/vscode/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ import {
1515
/**
1616
* This method is called when the extension is activated.
1717
*
18-
* The extension is activated the very first time the command is executed.
18+
* The extension is activated the very first time a command is executed or
19+
* if the workspace contains a pubspec.yaml file.
1920
*
2021
* @param {vscode.ExtensionContext} context
2122
* @returns The same instance of the extension context passed in.
23+
* @see {@link https://code.visualstudio.com/api/references/activation-events} for further details about
24+
* extension activation events.
2225
*/
2326
export function activate(
2427
context: vscode.ExtensionContext,

0 commit comments

Comments
 (0)