| Crates.io | tree-sitter-zsh |
| lib.rs | tree-sitter-zsh |
| version | 0.53.0 |
| created_at | 2025-10-29 01:34:04.296493+00 |
| updated_at | 2026-01-23 20:54:28.821508+00 |
| description | Zsh grammar for tree-sitter |
| homepage | |
| repository | https://github.com/georgeharker/tree-sitter-zsh |
| max_upload_size | |
| id | 1905916 |
| size | 32,874,906 |
Zsh grammar for tree-sitter.
[!NOTE] this is not the same as tree-sitter/tree-sitter-zsh which has been archived, but rather a complete reworking starting from the bash grammar.
Glob qualifier delimeters for 's::' and 'n::' and 'b::' must be ':' rather than arbitrary paired chars.
For neovim, add the following to your config
vim.api.nvim_create_autocmd("User", {
pattern = "TSUpdate",
callback = function()
require("nvim-treesitter.parsers").zsh = {
install_info = {
"https://github.com/georgeharker/tree-sitter-zsh",
generate_from_json = false, -- only needed if repo does not contain `src/grammar.json` either
queries = 'nvim-queries', -- also install queries from given directory
},
tier = 3,
}
end,
})
In addition to enabling treesitter for zsh files.
Install the dependencies:
npm install
Build and run the tests:
npm run build
npm run test
Run the build and tests in watch mode:
npm run test:watch