I am currently working on a DDEV integration Plugin. The goal of this plugin is to make the use of DDEV in your project as simple as possible and to automate as much of the configuration as possible. DDEV is a tool to spawn a development environment based on docker-compose. Configuring the docker-compose interpreter does work, but you need to:
- Choose the right docker-compose file (there are multiple)
- Select the right service (there are multiple)
- Set an environment variable
- Check the option to connect to an existing container
- Choose the right php bianry (there are multiple)
In the context of my plugin I do already have all these information. So I would like to implement some sort of "Auto configuration" by selecting a custom interpreter named "DDEV", that serves those information right from the DDEV configuration and is always up to date in that way, or at least to fill in those information to the docker-compose interpreter at their current state.
I tried implementing a custom remote credential contribution using the extension points remote.credentialsLanguageContribution and remote.credentialsType but this is not as straight forward as I hoped to and it also looks like I can not change the lifecycle settings from there (use existing container).
I also found the extension points com.jetbrains.php.remote.interpreter.ui.customConfigProvider and com.jetbrains.php.remote.remoteInterpreterManager but I did not manage to implement anything working there as those extension points expect only a single instance using this extension point. Also I am not sure if they are on the right place for what I am looking for.
Could you please give some advice if auto configuring a php interpreter from a plugin is possible and some hint how?
Thanks in advance!