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

Allow extensions to define tasks #11133

Open
1 task done
agent3bood opened this issue Apr 28, 2024 · 2 comments
Open
1 task done

Allow extensions to define tasks #11133

agent3bood opened this issue Apr 28, 2024 · 2 comments
Labels
enhancement [core label] extension infrastructure Feedback for extensions APIs, creation, management, etc tasks workspace Feedback for workspace management, layout, interactions, etc

Comments

@agent3bood
Copy link
Contributor

Check for existing issues

  • Completed

Describe the feature

This is a feature request.

Since the addition of extensions recently I was looking to replicate some features found in other IDEs extensions, to support framework specific tasks, for example 'run tests' and 'run app'.

Zed does have the ability to define static tasks via language::ContextProvider, I suggest adding fn context_provider(&self) -> Result<Option<language::ContextProvider>> to the Extension trait to allow for custom tasks.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@agent3bood agent3bood added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Apr 28, 2024
@Moshyfawn Moshyfawn added extension infrastructure Feedback for extensions APIs, creation, management, etc tasks workspace Feedback for workspace management, layout, interactions, etc and removed triage Maintainer needs to classify the issue labels Apr 29, 2024
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Apr 29, 2024
@mohsin
Copy link

mohsin commented Apr 29, 2024

Wouldn't it be better to allow automatically adding tasks based on the project? Zed already auto-detects languages out of the box so it would make sense to auto-detect project type and setup common tasks based on the project type. For example, an Android project would typically have Build Project, Run, Rebuild Project, Generate APK, etc.

@agent3bood
Copy link
Contributor Author

Wouldn't it be better to allow automatically adding tasks based on the project?

This is exactly what extensions should do, it define tasks then zed will call the extension to get those tasks. An extension will detect the project type and return the task accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] extension infrastructure Feedback for extensions APIs, creation, management, etc tasks workspace Feedback for workspace management, layout, interactions, etc
Projects
None yet
Development

No branches or pull requests

4 participants