tree-sitter-pact

0.0.1 • Public • Published

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/salamaashoush/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

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

Readme

Keywords

Package Sidebar

Install

npm i tree-sitter-pact

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

17.7 MB

Total Files

176

Last publish

Collaborators

  • salamaashoush