Skip to main content

Pact grammar for tree-sitter

Project description

tree-sitter-pact

tree-sitter grammar for pact smart contract language

Neovim setup (WIP)

I will create a PR to add this to the official nvim-treesitter repo once it's ready, for now you can use it by following these steps:

Clone the repo

git clone https://github.com/kadena-community/tree-sitter-pact.git

Add those to your init.lua

vim.filetype.add({
  extension = {
    pact = "pact",
    repl = "pact",
  },
})
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.pact = {
  install_info = {
    url = "~/path/to/c/tree-sitter-pact",
    files = { "src/parser.c" },
  },
  filetype = "pact",
}

Then run :TSInstall pact in neovim.

also you need to link the queries folder to your nvim config folder

mkdir -p ~/.config/nvim/after/queries/pact
ln ./queries/highlights.scm ~/.config/nvim/after/queries/pact/highlights.scm
ln ./queries/locals.scm ~/.config/nvim/after/queries/pact/locals.scm
ln ./queries/textobjects.scm ~/.config/nvim/after/queries/pact/textobjects.scm
ln ./queries/folds.scm ~/.config/nvim/after/queries/pact/folds.scm
ln ./queries/indents.scm ~/.config/nvim/after/queries/pact/indents.scm

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_pact-0.0.9.tar.gz (29.1 kB view details)

Uploaded Source

Built Distributions

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

tree_sitter_pact-0.0.9-cp39-abi3-win_arm64.whl (24.4 kB view details)

Uploaded CPython 3.9+Windows ARM64

tree_sitter_pact-0.0.9-cp39-abi3-win_amd64.whl (25.9 kB view details)

Uploaded CPython 3.9+Windows x86-64

tree_sitter_pact-0.0.9-cp39-abi3-musllinux_1_2_x86_64.whl (39.5 kB view details)

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

tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (42.8 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (43.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_pact-0.0.9-cp39-abi3-macosx_11_0_arm64.whl (23.3 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

tree_sitter_pact-0.0.9-cp39-abi3-macosx_10_9_x86_64.whl (23.6 kB view details)

Uploaded CPython 3.9+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_pact-0.0.9.tar.gz.

File metadata

  • Download URL: tree_sitter_pact-0.0.9.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for tree_sitter_pact-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c3c9a8d6ffaa63208e80dfe5cd0cf89f1184828ba8b637026e24bbd9216b2745
MD5 e58a7dd01e7666c15cac3c12b6a94f05
BLAKE2b-256 7ce383f173a0b1d8d9f9356c13d697bb7f6c65644bcb0257258f7a607f3126ab

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a9dd06255c1c807d048da239dc191523321e354be4906fc6621d7b262b7d7fb7
MD5 5b0e16427c7d0938c6cc3cc5c841d21a
BLAKE2b-256 29b468d3e5e63b236bc6541e48a5a7280c5d2ed1cae832fb18b3fd38f68cdcfa

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d58f914d8358e1955e49b46259b5a55e01b66bc55af8a4aeadb152ffebd665ab
MD5 0595b0ad48333ab5fd0d4118fdc2a390
BLAKE2b-256 b4b45108aee08144aabe94c1026d140ce57572cb7b7d906ec6addb905a57e4d0

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 23425c174729c5d05e639d96d9e26162be2746c41a00febc3e3549dbf8e7bd6c
MD5 2e1f8ddc5dd44d4e590c57225df7d8da
BLAKE2b-256 d9e7938c1ac89beaae0ee42277c4e3dfbea150637202fd246b9466b7b140a472

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 68bc5373f9c4393e7ca2e8e97f9f3f3b49ea834373812054c65301ca2e79f019
MD5 795f503fd28960ec7765297646b5ba74
BLAKE2b-256 6cd60cd97032f77b40e8476787c896157ecfbbf050b24fea4368deb45f817059

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b000b2ac765707ef9b953616fabb070756c0689a959f36534f3eb98d11bf5e62
MD5 56237eaa2f6a9208ce08c1cd3a68af97
BLAKE2b-256 c5ab2403ec528e6f9dffce9c2c19275e7230d4cf93a54c55b887492eb1b266be

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba4f311cecf08a359ba6c00adb3dd4eec3f7b2c4790b9a570709ae91210669b2
MD5 0b8a934114429803f0b78879595c4914
BLAKE2b-256 ebb46b81f005f01c081d27bbe1efc5649a6aca8e83d990f90d5705f3087d5098

See more details on using hashes here.

File details

Details for the file tree_sitter_pact-0.0.9-cp39-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_pact-0.0.9-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fed7320495249d49fee2badcc3694474f9999d5abf622bb855b3fff3a874f6d4
MD5 6bc353367ebe3da1b4e258f5f143cfeb
BLAKE2b-256 de1e74b52df0e5ffa1ff54ab2465409a88099f26d6efc31a44f98afba998d791

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