VSCode: Vala Development
How to setup VSCodium (Open Source Visual Studio Code) for Vala development.
If you like my work, ❤️ Sponsor Me. It would mean the world to me!

VSCodium

Install VSCodium from deb package (as documented on the official website).
Add the GPG key of the repository:
1
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/vscodium.gpg
Copied!
Add the repository:
1
echo 'deb https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/ vscodium main' | sudo tee --append /etc/apt/sources.list.d/vscodium.list
Copied!
Update package information and install vscodium:
1
sudo apt update && sudo apt install codium
Copied!

Syntax Highlighting

To begin with, you need to install the Vala Plugin for Visual Studio Code:
  1. 1.
    Visit the plugin's website and click "Download Extension" (a *.vsix file)
  2. 2.
    Run VSCodium
  3. 3.
    From within VSCodium, open the Extensions tab (Ctrl + Shift + X)
  4. 4.
    Click ... > Install from VSIX... on top of the Extensions sidebar
  5. 5.
    Select the previously downloaded *.vsix file and click Install
Now you can install the Vala Language Server. For this, open a Terminal and execute the following command:
1
sudo apt install vala-language-server
Copied!

Debugging

  1. 1.
    Visit the plugin's website and click "Download Extension" (a *.vsix file)
  2. 2.
    Run VSCodium
  3. 3.
    From within VSCodium, open the Extensions tab (Ctrl + Shift + X)
  4. 4.
    Click ... > Install from VSIX... on top of the Extensions sidebar
  5. 5.
    Select the previously downloaded *.vsix file and click Install
Now you can install the LLDB Debugger. For this, open a Terminal and execute the following command:
1
sudo apt install lldb
Copied!
Make sure to restart VSCodium and then you are nearly ready to start: When you start the debugger the first time in a project, it will ask for a run configuration. Here's a minimal one which should be enough to get you started:
1
{
2
"version": "0.2.0",
3
"configurations": [{
4
"type": "lldb",
5
"request": "launch",
6
"name": "Debug",
7
"program": "${workspaceFolder}/build/src/com.github.myteam.myapp",
8
"args": [],
9
"cwd": "${workspaceFolder}"
10
}]
11
}
Copied!
If you want to know more, make sure to have a look at the README in the CodeLLDB repo.

Further Reading