Closed cyrus01337 closed 2 years ago
Hey @cyrus01337 see if this VSCode feature does what you're looking for.
Tasks -> https://code.visualstudio.com/docs/editor/tasks Tasks on Folder Open -> https://code.visualstudio.com/docs/editor/tasks#_run-behavior
Concept
The ability to run a single/multiple command/s when switching workspaces which could not only run for all workspaces globally, but also be used for specific workspaces that require more fine-grained control. Unsure if this is posslble.
Premise
I feel it would be very useful for projects with set dependencies, notably git submodules from personal experiences, that need to be kept updated. Another use case would be to switch from 1 project to another and having the ability to run testing environments on both automagically.
Implementation
This is not exact, design suggestions/details and alternatives are welcome.
Hooks are stored in the VSC setting "hooks", "hooks.global" will store a list of commands to be run under the root directory and "hooks.[name]" would store and run a list of commands when switching to the workspace with that name.