-
Is there a way to run a vim command after finishing a task? Or alternatively, is there a way to define a task that is a vim command? The specific usecase is to run a vim command to perform a hot reload on a running Flutter app after a code-generation task is finished. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Currently tasks have to be external processes, but there are multiple ways to run a command after finishing a task.
task:subscribe("on_complete", function(task, status)
if status == require("overseer").STATUS.SUCCESS then
-- hot reload
end
end) This is very simple, but the downside is that there aren't great affordances for getting the task reference. There are template hooks for adjusting the arguments to a task, and your custom templates also declare their own task arguments, but there are not as many ways to retrieve the task reference once it has been launched. The other downside is that this is getting added as a function, which isn't serializable. That means that saving/loading the task to a bundle or via a session plugin will cause the callback to get lost.
|
Beta Was this translation helpful? Give feedback.
Currently tasks have to be external processes, but there are multiple ways to run a command after finishing a task.
This is very simple, but the downside is that there aren't great affordances for getting the task reference. There are template hooks for adjusting the arguments to a task, and your custom templates also declare their own task arguments, but there are not as many ways to retrieve the task reference once it has been launched. The other downside is that this is getting added as a function, which isn't se…