[Help] how to configure develop environment with alire?

hey, I am new to ada, and I am trying to configure my develop environment in wsl2(ArchLinux)

so far, I have installed alire and

steiner@Steiner ~/w/a/hello_world> alr --version                                           (base) 
alr 2.0.2+9b80158

steiner@Steiner ~/w/a/hello_world> alr toolchain                                           (base) 
CRATE       VERSION STATUS  NOTES                
gprbuild    22.0.1  Default      
gnat_native 14.2.1  Default     

steiner@Steiner ~/w/a/hello_world> which ada_language_server                               (base) 
/home/steiner/ada-language-server/vscode/ada/x64/linux/ada_language_server

as you can see, the alire, toolchain and ada_langauage_server are all already installed,
I want to write ada in vscode, but I found something wrong with the ada language server executing,

though the completion is working, but the log shows that there is an error and the als exit
I dont’t know what does this mean

__
ps: and I found that the code diagnosis only update after building

ps again: full project structure

1 Like

If you weren’t doing so already, can you try launching vscode from that project by cding to the project directory and running alr edit?

You may also have to run alr settings --set --global editor.cmd "code ." to make vscode your default editor in Alire.

cool, ada language server didn’t exit
but the code diagnosis is the same, always update after building

why your method work ?

Alire has some extra project-specific environmental variables that it sets that needs to be passed to vscode. This method is not always needed, but it’s a way to guarantee that the language server has everything that it needs. If you run alr printenv in the project, you can see what it needs to pass to vscode because launching the editor.

3 Likes

I suggest you

Please tell us if this helps.

1 Like