UVL language server based on tree-sitter.
Basic Documentation for the Codebase: Docs
- Requirements
- Rust 1.65+
- Git
git clone https://codeberg.org/caradhras/uvls.git
cd uvls
cargo build --release
There are prebuilt binaries for most common platforms so just installing the extension is enough.
ext install caradhras.uvls-code
- Completions
- Syntax highlighting
- Error messages
- Goto definitions and references
- Semantic analysis via z3
- Configuration via json or through an interactive web interface
- Code inlays
To enable feature analysis, z3 has to be in PATH. Install it via your favorite package manager or directly from sources. Find instructions for some popular operating systems below.
Download Chocolatey via Powershell and run the command below. The PATH will be set automatically after a restart.
choco install z3
brew install z3
sudo apt-get update
sudo apt-get install z3
We use tree-sitter as an initial parser to create a loose syntax tree of UVL code fragments. Because the tree-sitter grammar is more relaxed than the original UVL-grammar and has great error recovery, we can capture many incorrect expressions and provide decent error messages in most cases. Tree-sitter queries allow for easy symbol extraction and are used to transform the tree-sitter tree into a more compact graph. This graph is then used for further analysis. Queries are also used for syntax highlighting as tree-sitter was originally intended for that.