hblang-vscode
syntax, formatting, and linting for holey-bytes lang
usage guide:
the syntax highlighter will work correctly without hbc , however linting and formatting will require the hbc binary. see how to get that set up here.
integration with the linter and formatter is automatic and does not require further setup. (excluding per-workspace configuration)
per workspace settings (can also be set globally):
hblang.compilerPath : path to hbc. leave blank or set to hbc for autodetection.
hblang.compilerArgs : array of args to pass to compiler. e.g:
["--path-projection", "my-lib", "src/lib.hb", "--target", "x86_64-linux"]
installation guide:
linux
- ensure you have zig installed with
zig version
- compile hblang. you can add
-OReleaseSafe --use-lld --use-llvm for faster builds, but bug reports may be harder.
git clone https://git.ablecorp.eu/mlokis/hblang.git
cd hblang && zig build install
you can skip steps 3 and 4 if you set hblang.compilerPath in settings.
- add hbc to your local binaries.
mkdir -p ~/.local/bin
mv zig-out/bin/hbc ~/.local/bin
- add
~/.local/bin to your path (skip this if you already have it)
printf '\nexport PATH="$HOME/.local/bin:$PATH"\n' >> ~/.bashrc
note: this works for bash, if you use a different shell these two steps will be different.
- log out and log back in.
- check hbc is correctly installed with
hbc --help
windows
- ensure you have zig installed with
zig version
- compile hblang. you can add
-OReleaseSafe --use-lld --use-llvm for faster builds, but bug reports may be harder.
git clone https://git.ablecorp.eu/mlokis/hblang.git
cd hblang && zig build install
set hblang.compilerPath in setting to the hbc path in hblang/zig-out/bin/
| |