Rust based tools for the Hoon language.
You will need Rust nightly. Check ./rust-toolchain.toml for details.
Nix users are recommended to use Devenv. The included devenv.nix file will automatically build a developer environment for you.
This is a Rust workspace containing several packages.
The Hoon parser is a fork of the Nockchain hoon parser.
To build run:
cargo build -p hoon-parser.
To test run:
./target/debug/hoon-parser <filename>.hoon
A Language Server Protocol for Hoon. It depends on hoon-parser.
For details about the implementation status of the different LSP features please read ./LSP_STATUS.md written by OpenAI Codex 5.3.
To build run:
cargo build -p hoon-lsp.
To use you'll need to manually added to your IDE config.
Users please edit this
Add the following to your nvim-lspconfig .lua file:
vim.lsp.config('hoon-lsp', {
cmd = { '/path/to/hoon-rs/target/debug/hoon-lsp', '--stdio' },
filetypes = { 'bill', 'docket-0', 'hoon', 'kelvin' },
})
vim.lsp.enable 'hoon-lsp'Add the following under the hoon language block in your languages.toml file:
language-servers = ["hoon-lsp"]
Then add the following block somewhere in languages.toml:
[language-server.hoon-lsp]
command = "<absolute path to this repo>/target/debug/hoon-lsp"A code formatter for Hoon. It depends on hoon-parser.
NOTE Formatter is currently broken as it depends on a different fork of hoon-parser which can preserve the different wide/tall/irregular syntax of various runes. Coming soon™.
To build run:
cargo build -p hoon-fmt.
To test run:
./target/debug/hoon-fmt <filename>.hoon.
To use you'll need to manually added to your IDE config.
Users please edit this
Users please edit this
Add the following under the hoon language block in your languages.toml file:
formatter = {command = "<absolute path to this repo>/target/debug/hoonfmt", args = ["-"]}