Contents
Vala Tools
Build Systems
Meson - a front end to the Ninja build system with Vala support (The main build system for Vala)
Automake - supports Vala since 1.11
Autovala - a program that automates the creation of CMake files for Vala projects.
BuilDj - Software Project Description Format
- CMake:
CMake macros exist to support Vala. (Detailed article).
An alternative set of CMake modules that support parallel builds.
Valder - build system written in Vala and C
Waf based template project
xmake - build system written in Lua
Code Editors and IDEs
Text editors with additional features for handling computer code can be called "code editors". The most fully featured ones are often called "integrated development environments". There are a number of editors that can handle Vala code. Many are listed below along with a list of features they implement.
Editor |
Syntax Highlighting |
Code Formatting |
Static Code Analysis |
Auto- completion |
Jump to Definition |
Integrated Documentation |
Integrated Build, Test and Debug |
Refactoring Tools |
Yes |
|
Yes |
Yes |
|
|
|
|
|
Atom |
|
|
|
|
|
|||
Yes |
|
|
|
|
|
|
|
|
Emacs |
|
|
|
|
|
|
|
|
Yes |
|
|
Yes |
Yes |
|
|
|
|
gedit |
Yes |
|
|
|
|
|
|
|
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
|
||
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
|
|
|
|
|
|
|
|
|
|
||
Yes |
|
|
|
|
|
|
|
|
SublimeText |
|
|
|
|
|
|
||
TextMate |
|
|
|
|
|
|
||
|
|
|
|
|
||||
|
Syntax highlighting and code formatting affect the visual display of the code in the editor. For example syntax highlighting will color keywords differently to identifiers to make it easier to read the code. Code formatting will change indentation and spacing to match a given coding style, such as inserting a space between a function name and the opening parenthesis of its arguments.
Static code analysis shows diagnostic messages in the editor about syntax errors. These are usually the same messages that appear when compiling from the command line because many editors use libvala to analyse the code.
Auto-completion and jump to definition require the editor to parse the code in the project and store the locations where identifiers are defined. Auto-completion is often triggered with the CTRL + SPACE key combination. If there is more than one possible completion a list of options will usually appear. Jump to definition is used to navigate the project and read an identifiers' related code, such as the code block of a function definition.
Integrated documentation provides documentation for symbols in the editor. The documentation is likely to be from the same sources used by Valadoc.org.
Integrated build, test and debug is probably best understood in relation to the Red-Green-Refactor cycle of test driven development. The editor provides a user interface to make it easy to build the project or component, then run the test suite and see the test report. Tests that are failing can be run, step by step, through a debugger to identify why the code is not working as expected.
Refactoring tools provide support for techniques like extracting repeated code into a method or renaming an identifier to make its intent clearer.
Discontinued
MonoDevelop comes with Vala bindings since 2.0. (monodevelop-vala is no longer supported)
Netbeans - Plugin for the Netbeans IDE for Vala (no commit since 2011)
Vala Toys for gedit - Vala plugin for gedit (no commit since 2012)
Valama - See Issue #249 on GitHub from February 2018
Valencia - Vala plugin for gedit (no commit since 2014)
Val(a)IDE is an integrated development environment for Vala, developed with Vala. (valide is no longer supported)
valaDevelop is an integrated development environment for Vala, developed with Vala. (valaDevelop is no longer supported)
Syntax Support
GtkSourceView extends the GtkTextView widget to provide syntax highlighting for applications using GTK+, this includes the elementary OS Code, gedit and GNOME Builder editors. Syntax highlighting for each language is through a .lang file. GtkSourceView has both a Vala lang file and a Genie lang file
Although TextMate is a macOS editor, its language bundles can be imported into many other editors, for example: Visual Studio Code; Sublime Text; the JetBrains IntelliJ collection of editors; Atom; Ace web editor and Linuguist, used for GitHub syntax highlighting. A Vala TextMate bundle does already exist. To understand more about how to write a language bundle read TextMate Language Grammars, TextMate Scope Selectors, Writing a TextMate Grammar: Some Lessons Learned and Notes on how to create a Language Grammar
highlight.js - Client side syntax highlighter (JS+HTML)
MoinMoin Wiki parser.
Pygments has a lexer since version 1.1.
Language Server Protocol Support
The Language Server Protocol was originally developed by Microsoft for Visual Studio Code, but clients have now been developed for many other editors. There are LSP clients for:
The Language Server Protocol uses JSON-RPC to request features like code formatting, code diagnostics, completion suggestions, jump to definition, code lens and function signature help from the language server. The Language Server Protocol Specification gives more details.
Currently there are two active developing implementations of a language server for Vala:
vala-lang/vala-language-server - designed for any editor that supports LSP, including VSCode, vim, and GNOME Builder. Fully compatible with Meson and compile_commands.json. Has diagnostics, robust completion, signature help, document outlining, workspace symbols search, support for finding references, and more. Has packages available in a number of distributions, including Ubuntu, Fedora, Arch, and Alpine Linux. See the README for more information.
esodan/gvls - currently the default language server for Vala in GNOME Builder and provides support to any editor with support for LSP, supports Meson introspection provided by Clients or auto-detected. Supports diagnostics, completion, signature help, document's symbos, workspace symbols, find symbols, documentation, look at features. Server supports stdio and internet connection, from clients. Provides a fast LSP Client supporting connection using stdio and internet connections.
Other implementations that appear to not be active:
philippejer/vala-language-server-alpha (Forked from benwaffle)
Server Common Specifications
Clients should be able to use any server, but there are common issues like server configuration, so visit Vala LSP Server Specifications.
Tree-Sitter Support
Other Tools
Valadoc - generate documentation from VAPIs, GIRs and other files
Gcovr - code coverage reports, use the --debug switch with valac to include source file line numbers
Uncrustify - source code beautifier
Vala-Lint - check Vala code files for code-style errors
Online Services Supporting Vala
Codecov Vala Example - example of integrating a gcov report from a Vala project in to Codecov