Skip to main content

Zsh grammar for tree-sitter

Project description

tree-sitter-zsh

CI discord matrix crates npm pypi

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.

Known issues:

Glob qualifier delimeters for 's::' and 'n::' and 'b::' must be ':' rather than arbitrary paired chars.

Installation

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.

Development

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

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_zsh-0.38.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_zsh-0.38.0-cp310-abi3-win_arm64.whl (624.3 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_zsh-0.38.0-cp310-abi3-win_amd64.whl (628.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_x86_64.whl (683.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_aarch64.whl (683.6 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (687.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (685.9 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_zsh-0.38.0-cp310-abi3-macosx_11_0_arm64.whl (663.2 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_zsh-0.38.0-cp310-abi3-macosx_10_9_x86_64.whl (628.3 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_zsh-0.38.0.tar.gz.

File metadata

  • Download URL: tree_sitter_zsh-0.38.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_sitter_zsh-0.38.0.tar.gz
Algorithm Hash digest
SHA256 26460d445c7d23ca03bb6dbd7bfff4e8f0551853ed3b4c42567ad143d346de62
MD5 6a21ee7b102b3f3f8452cc9f20ce066c
BLAKE2b-256 85cae6b1afc795d6dcbba435858ff8fd9b2de565dbc1d4e92a118cefa895462e

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 379c37c6b3b233de9cb1d40edbf1b88e8b8383db622dcccfd73afa64f04c2215
MD5 3a8f03574adbca056a5e12036950dd3e
BLAKE2b-256 baf42d668755e016c4a5a98bc098c8de0ba4e04cc206f577ebf1b3806210dddb

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 82aeebb2b1d0db4ba94d21fc3e7f05402d7b26a7de4a9a135b5107595d5bad85
MD5 50da31e9ed82dd78108a9becdb617960
BLAKE2b-256 322a92cf4203a6894998387eedfd419b428ae46641b98f9c4b746c99ba9e0fa4

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f33be810094c976a01cc0353686b56e57a08ca6ccfcdb84f7584f40bdc6a2cb5
MD5 7d5c9c2e4540fdb8e8910b2f57bd0ce1
BLAKE2b-256 5ecfb88e1c69dbdab38ab629a14f7b18d06fe7f0d00d834191c74335c36356ce

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4b4cb3580467209c72f78388a8d1f6b84862cb3ecc8c7b8b07d096cddd4103b7
MD5 50f68edb61553cb566e78d4f0b3b8f4c
BLAKE2b-256 8bdf453f42f0f4e929acd6291b504d273a3e6f662d9b6876c132121a86b04a19

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f74c3ef29a270be57fd9f0e7d2054e72e8a91ab470e689d5cec30f6122416dca
MD5 1eb0762089f38fecb0135108aa12c903
BLAKE2b-256 b4fd0bf3d852ed55f6844adfabab22bda1a15157507e1464195899d197cbc38f

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 64531334ecd9fb4d9f39a39c89e0991508702f5aa53e2980d670462259af7009
MD5 a1f3ea9837f046067633f9ec690f7bc2
BLAKE2b-256 b7a32ac21a5bbc125451dba8823636dd30f96aba90e34578af297d17b7efd444

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a5523a849392735c7017bb6907663c4fe859ee982c92fdcba9a216184ae904b
MD5 2615186722f6a2e629f61ac53ad019e1
BLAKE2b-256 b5065ee6289d2bf95fdb95590b4769fd51a0ea46bc9f04d8da8a34ef24726563

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.38.0-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_zsh-0.38.0-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5a8c8bb2f4c45cf62fab0b3b0b428eba0f1a9b5b1c0bd065c540ae56a218e549
MD5 1d62b98b5712ca0bac9cf7c6d3a50ab7
BLAKE2b-256 49f914e35f291eb79af41f0e695b0a4b8d4601057fec4345412220fe57947f15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page