Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: Global option to turn autostart off completely #245

Open
1 task done
deanishe opened this issue Dec 20, 2023 · 5 comments
Open
1 task done

feature request: Global option to turn autostart off completely #245

deanishe opened this issue Dec 20, 2023 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@deanishe
Copy link

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

I would like a simple, global option to disable autostart completely. I don't ever want tasks to run on load, and that is currently difficult to achieve without great effort. In particular, I've had to make a private copy of the resession.nvim plugin.

Provide background

I would like to be able to add tasks like "Publish to Server", but I also don't want to risk such destructive tasks running when I don't expect it.

So I would like to be able to disable autostart completely.

Currently, I am editing tasks, overriding options and re-writing plugins to achieve this. I would prefer the convenience — and especially peace — of mind of a global option to turn autostart off everywhere at once.

What is the significance of this feature?

strongly desired

Additional details

No response

@deanishe deanishe added the enhancement New feature or request label Dec 20, 2023
@stevearc
Copy link
Owner

Presumably when you use :OverseerRun and select the task from the list you would be fine with it running, correct? It sounds like the main situation where you don't want it to autostart is restoring from a session? Are there any other cases?

I ask because there may be a better way to be more targeted about protecting specific sensitive tasks without globally disabling autostart

@stevearc stevearc added the question Further information is requested label Dec 24, 2023
@deanishe
Copy link
Author

Are there any other cases?

Not starting tasks on session auto-load is the main thing, yes.

But generally speaking, I do not want my editor kicking off build jobs just because I opened it.

I would like a global option because auto-starting tasks appears to be a deliberate design goal, and I don't want to be surprised by a new feature that brings its own, new "no autostart" flag with it that I didn't realise I had to set.

there may be a better way to be more targeted about protecting specific sensitive tasks without globally disabling autostart

Personally, I just don't want anything running automatically. The "watch" feature covers my autorun needs perfectly. A global option is the best way to achieve that, imo. Anything else — other than defaulting to no autostart — is more effort and more error prone.

@github-actions github-actions bot removed the question Further information is requested label Dec 28, 2023
@stevearc
Copy link
Owner

stevearc commented Jan 6, 2024

I added a config option to disable autostart when loading tasks from a bundle. It also applies to the resession.nvim plugin. LMK if this solves your problem

@stevearc stevearc added the question Further information is requested label Jan 6, 2024
@deanishe
Copy link
Author

LMK if this solves your problem

I no longer need my forked plugin, so thanks very much for that 👍

It doesn't really address the more general issue of Overseer running tasks more eagerly than I'd like. It's not possible, AFAIK, to create a task without also immediately running it. (Instead, I have to create a task that does something innocuous, then edit it to set the real command.)

So I would like — generally speaking — the option for task execution to not be coupled with any other operation. Then I can add tasks like "clean all" or "push to live server" ahead of time without having to wait till I actually want to run the task (and generally not worry about the tasks ever running automatically).

@github-actions github-actions bot removed the question Further information is requested label Jan 10, 2024
@stevearc
Copy link
Owner

It's not possible, AFAIK, to create a task without also immediately running it

Only sort of true. It's true that if you use :OverseerRun the task is going to be immediately created and executed. However if you want to just create a task you can use the new_task API which doesn't autostart, or you can call run_template directly and pass autostart = false.

Do either of those work for your use case? I'd be very curious if you find yourself wanting to :OverseerRun, select a task, but not start executing it. If that's the case I'd want to hear more about your workflow, because it's a situation I have never considered. From the current description, I don't see the advantage of even creating the "clean all" task until you want to run it.

@stevearc stevearc added the question Further information is requested label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants