overseer.nvim icon indicating copy to clipboard operation
overseer.nvim copied to clipboard

Automatic task startup with session management

Open SergeyPoznyakAkvelon opened this issue 3 years ago • 1 comments

I currently use the rmagatti/auto-session plugin for managing sessions in vim. Basically it just autosaves and restores sessions based on PWD. It's really useful to be able to quickly get back to where I left off in a project.

It would be super nice to have something like this in overseer, but for currently running tasks. For example:

  1. Open nvim in a project dir
  2. Start a long running project task (e.g. npm start)
  3. Reopen nvim
  4. Tasks starts again because it was running when nvim closed
  5. Stop task
  6. Reopen nvim
  7. Task is not running

SergeyPoznyakAkvelon avatar Sep 01 '22 11:09 SergeyPoznyakAkvelon

I've simplified some APIs and added documentation about how you can integrate overseer with any session plugin, and provided an example for auto-session. Since you wanted to only save the currently running tasks, you'll need to make the following change to the example:

        overseer.list_tasks({
          bundleable = true,
          status = overseer.STATUS.RUNNING, -- This will list only the running tasks
        }),

stevearc avatar Sep 01 '22 16:09 stevearc