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.52.0.tar.gz (1.3 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.52.0-cp310-abi3-win_arm64.whl (630.5 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_zsh-0.52.0-cp310-abi3-win_amd64.whl (640.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_zsh-0.52.0-cp310-abi3-musllinux_1_2_x86_64.whl (713.7 kB view details)

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

tree_sitter_zsh-0.52.0-cp310-abi3-musllinux_1_2_aarch64.whl (709.6 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_zsh-0.52.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (719.6 kB view details)

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

tree_sitter_zsh-0.52.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (713.7 kB view details)

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

tree_sitter_zsh-0.52.0-cp310-abi3-macosx_11_0_arm64.whl (662.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_zsh-0.52.0-cp310-abi3-macosx_10_9_x86_64.whl (632.5 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tree_sitter_zsh-0.52.0.tar.gz
  • Upload date:
  • Size: 1.3 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.52.0.tar.gz
Algorithm Hash digest
SHA256 0979d4618f8e4b04c99ef2a2751b54ca5114a86580a130e271ab74f06d631c41
MD5 adc37e515b0acdf6aa8834309d7c62ed
BLAKE2b-256 a9057665102ed2d8496158765c506696950de564df2916851c20d8c7335f178c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c12e9fb13c4b598bd8dd5531228de0d2a2e3f79c44c135f714a381f5b73f1619
MD5 9d6e92750c82e6f9a7f52507fb4d46b9
BLAKE2b-256 550923900bf9584ca1e0ec4efa561d7b334944f8972798e720d09b7daec81607

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b3327e0ef2d6c89dc9765ab4a9054f9a93bb5aadce579c347c89c473bde316cd
MD5 58a70d4d90b8f1380841b0a07efbd4e8
BLAKE2b-256 20c0312dcac59648dcc8c680ade8a0dcb26c6ee453944359a61a35ce29b4140f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4804c30e12b0d62c1888fc204a2ce925bc395f8fd04bafb2e2253de330ea3c7a
MD5 22d7e3e6708e4416fdf23b24648783da
BLAKE2b-256 5003cd8af5a72094f9615e87ffa6e079810c04737843d27233e1e9b3e9980c9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a58299db181bf893bdb72bc5c2e3df21efb36cd2d8f7e051788f74f8597bd27a
MD5 c74482577639f9e838ca1a5b6d5fc4f5
BLAKE2b-256 0d5760d623e04eee62437abcbb13b4354e536f54edc4a1027285e1496f638b1f

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.52.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.52.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ca3da77abc15c0be048e0688d3ac1a566387ea197c1c91aee16054454f5f4036
MD5 da365af38e216698e1d7827e4e9485e3
BLAKE2b-256 8c171fdeca5757309b85100b41b2fc83ad23859ee582976c57fc2ce63d45765e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 be31d5075d238c2ac0a91392f9c48f96237f38ba89d6d708d7daff5e0912e4a1
MD5 1998c39da284f93093ddf82e8794b874
BLAKE2b-256 53770b07d795eb3ffde1236afa0d8e1fcb19133be8c07f079064f7db28f580be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 33d0bb8daf52d892e1733346fe60072094e6b5d27b6b27829da4e5949679f27c
MD5 3134ca8ca1a233829d8e2e77e2b0460c
BLAKE2b-256 9342557eeef16b7c6757df7fb0fad8c99d584984d6c6bfcd0a37da8ad8351360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.52.0-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6074598e40a562407f67b0d36c8f350e64e42e020d1be45363d9fbd644b91ad1
MD5 b74959c004ae67c3752d919438987521
BLAKE2b-256 4c52ab9ef76c3024abafbb256d3efbf72af1e4ed7dff8343e600457eaf600c59

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