module
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Jul 15, 2026
License: Apache-2.0
Opens a new window with license information.
README
¶
tree-sitter-wit

WebAssembly Interface Types (WIT) grammar for tree-sitter.
For an infographic of the WIT spec, please see the WIT Cheatsheet by Cosmonic.
Example

Installation
Neovim
Neovim users can use the nvim-treesitter plugin to install the grammar.
Using Lazy.nvim package manager
-
Add the following to your Lua configuration:
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"wit",
}
}
}
Manual Installation
-
Add the following to your init.lua:
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.wit = {
install_info = {
url = "https://github.com/liamwh/tree-sitter-wit",
files = { "src/parser.c" },
maintainers = { "@liamwh" },
branch = "main",
}
}
-
Clone the repo
-
Ensure you have just installed
-
Then run just install-local from the root of the repo; this will copy the queries into the directory used by Neovim
-
Then in Neovim run TSInstall wit
-
And you should enjoy the syntax highlighting! Please let me know if this works for you 😊
Contributing
Please see the CONTRIBUTING.md file for more information.
Directories
¶
bindings
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.