Skip to content

Commit 0394c90

Browse files
committed
feat: commands to open docs in browser
1 parent 2ca23f3 commit 0394c90

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Go to definition from the sidebar and command palette.
88
- Run last task command.
99
- Multi-root workspace support.
10+
- Open docs from the sidebar and command palette.
1011
- Ability to initialize a Taskfile in the current workspace.
1112
- If no Taskfile is detected a button will appear in the sidebar.
1213
- Refresh on save.

package.json

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@
8989
"title": "Go to Definition",
9090
"category": "Task",
9191
"icon": "$(go-to-file)"
92+
},
93+
{
94+
"command": "vscode-task.openInstallation",
95+
"title": "Open Installation",
96+
"category": "Task",
97+
"icon": "$(globe)"
98+
},
99+
{
100+
"command": "vscode-task.openUsage",
101+
"title": "Open Usage",
102+
"category": "Task",
103+
"icon": "$(globe)"
92104
}
93105
],
94106
"viewsContainers": {
@@ -127,19 +139,24 @@
127139
],
128140
"view/title": [
129141
{
130-
"command": "vscode-task.refresh",
142+
"command": "vscode-task.openUsage",
131143
"when": "view == vscode-task.tasks",
132144
"group": "navigation@1"
133145
},
146+
{
147+
"command": "vscode-task.refresh",
148+
"when": "view == vscode-task.tasks",
149+
"group": "navigation@2"
150+
},
134151
{
135152
"command": "vscode-task.viewAsList",
136153
"when": "view == vscode-task.tasks && vscode-task:treeNesting",
137-
"group": "navigation@2"
154+
"group": "navigation@3"
138155
},
139156
{
140157
"command": "vscode-task.viewAsTree",
141158
"when": "view == vscode-task.tasks && !vscode-task:treeNesting",
142-
"group": "navigation@3"
159+
"group": "navigation@4"
143160
}
144161
],
145162
"view/item/context": [

src/task.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ export class TaskExtension {
146146
}
147147
});
148148
}));
149+
150+
// Open installation
151+
context.subscriptions.push(vscode.commands.registerCommand('vscode-task.openInstallation', () => {
152+
vscode.env.openExternal(vscode.Uri.parse('https://taskfile.dev/installation'));
153+
}));
154+
155+
// Open usage
156+
context.subscriptions.push(vscode.commands.registerCommand('vscode-task.openUsage', () => {
157+
vscode.env.openExternal(vscode.Uri.parse('https://taskfile.dev/usage'));
158+
}));
149159
}
150160

151161
public registerListeners(context: vscode.ExtensionContext): void {

0 commit comments

Comments
 (0)