Skip to content

Commit

Permalink
chore: Refactor task reveal options in JuvixTaskProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaprieto committed Aug 28, 2024
1 parent 4580bba commit c4af393
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class JuvixTaskProvider implements vscode.TaskProvider {
command: 'compile',
args: [config.getCompilationFlags(), '${file}'],
group: vscode.TaskGroup.Build,
reveal: vscode.TaskRevealKind.Always,
reveal: vscode.TaskRevealKind.Silent,
},
{
command: 'core-compile',
Expand Down Expand Up @@ -115,8 +115,8 @@ export class JuvixTaskProvider implements vscode.TaskProvider {
{
command: 'clean',
args: [config.getCleanFlags()],
group: vscode.TaskGroup.Build, // could it be Clean?
reveal: vscode.TaskRevealKind.Always,
group: vscode.TaskGroup.Clean, // could it be Clean?
reveal: vscode.TaskRevealKind.Silent,
},
{
command: 'update-dependencies',
Expand Down Expand Up @@ -145,7 +145,7 @@ export class JuvixTaskProvider implements vscode.TaskProvider {
vscodeTask.presentationOptions = {
reveal: def.reveal,
showReuseMessage: false,
panel: vscode.TaskPanelKind.Shared,
panel: vscode.TaskPanelKind.Dedicated,
focus: false,
echo: false,
clear: true,
Expand Down Expand Up @@ -193,13 +193,16 @@ export async function JuvixTask(
case 'update-dependencies':
exec = new vscode.ShellExecution(JuvixExec + `dependencies update`);
break;
case 'typecheck':
exec = new vscode.ShellExecution(JuvixExec + ` ${input}` + ' && echo "🎉 Typecheck successful!"');
break;
default:
exec = new vscode.ShellExecution(JuvixExec + ` ${input}`);
break;
}
return new vscode.Task(
definition,
vscode.TaskScope.Global,
vscode.TaskScope.Workspace,
name,
TASK_TYPE,
exec,
Expand Down

0 comments on commit c4af393

Please sign in to comment.