Neovim Treesitter integration for the Huff language
huff.nvim is a lightweight Neovim plugin that brings Treesitter-powered syntax highlighting and indentation support for the Huff low-level EVM language.
- 🧩 Treesitter-powered parsing — accurate syntax highlighting
- 📜 Huff language support — compatible with
.hufffiles - 🔍 Opcode lookup — hover over opcodes to see descriptions, inputs, and outputs
- ⚡ Lazy-loaded for performance
- 🛠️ Simple setup, no extra configuration needed
Using lazy.nvim:
return {
"mmsaki/huff.nvim",
version = "0.2.*",
dependencies = { "nvim-treesitter/nvim-treesitter" },
}| Command | Description |
|---|---|
:TSInstall huff |
Installs the Huff parser |
:TSUpdate |
Updates all parsers |
:OpcodeInfo |
Look up EVM opcode information |
| shift → k | Opcode Lookup |
Supports all EVM opcodes including arithmetic, comparison, bitwise, memory, storage, and control flow operations.
While there are other Huff plugins available, huff.nvim offers several advantages:
| Feature | huff.nvim | pedrommaiaa/vim-huff | wuwe1/vim-huff |
|---|---|---|---|
| Grammar Parsing | [x] | x | x |
| TreeSitter Support | [x] | x | x |
| Maintenance Status | [x] | ? | ? |
| Syntax Highlighting | [x] | ||
| Indentation | [x] | ? | ? |
| Opcode Lookup | [x] | ? | [x] |
Contributions are welcome! If you’d like to improve the parser, fix bugs, or add features, open an issue or submit a PR.