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.45.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.45.0-cp310-abi3-win_arm64.whl (629.3 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_zsh-0.45.0-cp310-abi3-win_amd64.whl (639.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_zsh-0.45.0-cp310-abi3-musllinux_1_2_x86_64.whl (713.2 kB view details)

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

tree_sitter_zsh-0.45.0-cp310-abi3-musllinux_1_2_aarch64.whl (708.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_zsh-0.45.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (719.1 kB view details)

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

tree_sitter_zsh-0.45.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (713.1 kB view details)

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

tree_sitter_zsh-0.45.0-cp310-abi3-macosx_11_0_arm64.whl (661.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_zsh-0.45.0-cp310-abi3-macosx_10_9_x86_64.whl (632.0 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: tree_sitter_zsh-0.45.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.45.0.tar.gz
Algorithm Hash digest
SHA256 f80ef799d3accaa2f10faa6c787f1106fa1f166ad0eb7c23ede59aa739651972
MD5 0df005ef52debb7c5e21224dbe1c6b41
BLAKE2b-256 05636788f15e2125a744b8b198430bbc86e5d653d579d3720a0d4dde774abe5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 66ce49078bbb8f36beb91431d83622bb760596fbd50eea93c99bc0d8d08eb09d
MD5 a83e9b24ef4a335f8667aa7520b66a2a
BLAKE2b-256 022265f204de20391f0dbb1e92b6726d394d11ccb9b0590a3f6ec839df9bb3a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 88f32fe58f1e9e82e85452592d881382ba93b4f5fdb21398aa2c59abe3d6614a
MD5 4e1e8881c7d4257bde9222ceb527a656
BLAKE2b-256 dc71fb647aec7f18a6a086ecba6f291ed97f8a1c552e4c6f4e28586854120470

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 aab7270f46155075d602bd716488e3f44144748f9938b17b003aea6aa8610778
MD5 1b3a409f23b9137b68bc10af1a1125b6
BLAKE2b-256 8f4886ecca9d454cc6785a5a8f369a6bada8083b00c1deac3d082e1fbe44b800

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 abf13f7952cab188589035589b4baf65c64a9efb25201a77854cb9a7c972f5e7
MD5 153aa45e7c636699060433711dc75315
BLAKE2b-256 ca9b3521ee43f84d89aa775d27ea9ab346d1d3bac525ec5d51e3d8642950c17d

See more details on using hashes here.

File details

Details for the file tree_sitter_zsh-0.45.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.45.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 07f754d7314f63fb6a237956a5132a81c9f3dd3a1f74ff4ace641b75e52dd04f
MD5 ca686d7bb9b6a1d7461ca2182a7a6722
BLAKE2b-256 c058459d29dbfee99113900cc2f3d9dc83958fa3b8eba2a31dd966ff47d6d65a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ac9f94b22cdd780285bc5422dae64bc7fec72342ec744bd9e020426fb930c018
MD5 b99bc0d1705f25a2815c4873a4844b51
BLAKE2b-256 5ae8b2fa88a1d42b5b9a565d3b8728bfcc60e4cc98c1a6ae85514c1b7a9e771b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f557fbff4f7f89d04e1495fe2f2bff641aa0d61ed66228bd603d3d750fee3f8
MD5 e85ceb9ad5161a8cac56dc6da40289ca
BLAKE2b-256 f3128f3a4d79a4f2254a14af08678fcc431ee81f7e9d594b53920d0f1bbecff3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_zsh-0.45.0-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e94f45ceea8732327a00c48cd01df1d19f4b49dc02519ff104453ccd8ada008f
MD5 fc012570d744884eacc4e37fb27f565f
BLAKE2b-256 3f6ef1bdbcf807a6a62906d45a8e4cd13d41d4d71dfc019b169abdfd177053a0

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