d2-vscode
d2-vscode copied to clipboard
add task provider to run d2
provide task to simply run d2 (e.g. on a file and create an svg right next to it (can use the preview settings for layout/theme etc))
maybe on a whole directory, or maybe to format the whole workspace
see https://stackoverflow.com/questions/55135876/extension-api-task-provider-build-task-example
this should be relatively straightforward.
With PR #48, this task is complete
#48 provides a command to run but a d2 render task could also be helpful in some cases
Could you be more specific?
vscode.tasks.registerTaskProvider vs commands.registerCommand
this has the same features but is different from #47 in that this is a command rather than registering a task provider that can be used e.g. from the tasks: run task command
https://user-images.githubusercontent.com/85081687/221334706-054024bb-0b04-4152-afb4-5e827837297b.mp4

Got it, should this even be available? Doesn't make much sense to me.
There's a lot of cool things that tasks support https://code.visualstudio.com/docs/editor/tasks