skywind3000 / asynctasks.vim

:rocket: Modern Task System for Project Building, Testing and Deploying !!
https://www.vim.org/scripts/script.php?script_id=5853
MIT License
913 stars 30 forks source link

How to check if the task was successful? #105

Open jclsn opened 1 year ago

jclsn commented 1 year ago

I would like to run a command after a task was run successfully. Is there a way?

skywind3000 commented 1 year ago

https://github.com/skywind3000/asynctasks.vim/wiki/Task-Examples#silence-and-notify

jclsn commented 1 year ago

Yeah that works, but how can I now start the debugger afterwards? I would like to use the task as a pre-launch task for Vimspector, that only starts debugging if the :Make command was successful. I have tried to use notify=:call vimspector#Launch() but it doesn't work.

jclsn commented 1 year ago

Any solution to this? I would like to add Async Tasks to the pre-launch strategies for Vimspector as an alternative to dispatch.vim, but for that I need the return value.

skywind3000 commented 1 year ago

what is your task configuration ?

jclsn commented 1 year ago

I just realized that I was still using dispatch.vim's :Make as building command. Anyway, it should not matter. I just need a way to determine if a command was successful. If asynctasks.vim has no influence on what the command returns, which I am assuming, this is pointless to try I guess.

Anyway, this is what I was trying

[.build-and-debug]
command=Make
silent=1
notify=:call vimspector#Launch()