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 installBuild and run the tests:
npm run build
npm run testRun the build and tests in watch mode:
npm run test:watch