Currently, the recommended workflow starts with alr edit
which sets the environment necessary for working with Alire and then launches VSCode. The Ada plugin for VSCode then launches the ada_language_server and allows VSCode to communicate with it via LSP, and since the terminal launched VSCode which launches ada-language-server, the environment is carried over to each child process. This works, but...
It is really annoying to have to restart the whole editor when the alire configuration changes, or I want to switch to a different gpr project file. In my case, since I was using NeoVim, I wrote this plugin that detects that I am editing in an alire workspace and sets the environment by parsing the output of alr printenv
. It also allows me to switch gpr files. If we had a similar plugin for VSCode, users could just install both the Ada and Alire plugins and everything would work automagically.
It would also enable Gitpod to work for Alire projects out-of-the-box. It is not (yet?) possible to set editor-wide environment variables, so in the meantime you need to set your gitpod dotfiles in preferences to https://github.com/TamaMcGlinn/gitpod_alire_dotfiles or include the same hackaround in your existing dotfiles. (you can try it out on Adabots_Examples by clicking here). A separate plugin would fix that because you could specify it in your .gitpod.yml for the repo.
I might write the plugin myself, but I wanted to post here to see if anyone is already working on it.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too