hhamud / tree-sitter-noir

Treesitter grammer and parser for the Noir Language

Home Page:https://docs.rs/tree-sitter-noir/latest/tree_sitter_noir/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree-sitter Noir

test npm Latest version gpl-3.0

Noir grammar and parser for tree-sitter

Emacs

To use with Emacs; use the following package here.

NeoVim

  1. Make sure that you have the latest version of Neovim and have also installed the neovim tree-sitter plugin.

  2. Add the following lines to your init.vim file:

lua <<EOF
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()

parser_config.noir = {
    install_info = {
        url = "https://github.com/hhamud/tree-sitter-noir", -- the url for this tree-sitter grammar
        files = {"src/parser.c", "src/scanner.c"},
        branch = "main",
    },
    filetype = "noir", -- if filetype does not agrees with parser name you can define this field
}

require'nvim-treesitter.configs'.setup {
  ensure_installed = "noir", -- The custom parser
  highlight = {
    enable = true,              -- false will disable the whole extension
  },
}
EOF

Other

To install the grammar from NPM

npm i tree-sitter-noir

To install the grammar from cargo

cargo add tree-sitter-noir

References

Contributing

Contributions to tree-sitter-noir are welcome. If you find any issues or have suggestions for improvement, please create a new issue or submit a pull request on the GitHub repository.

About

Treesitter grammer and parser for the Noir Language

https://docs.rs/tree-sitter-noir/latest/tree_sitter_noir/

License:GNU General Public License v3.0


Languages

Language:C 97.9%Language:JavaScript 1.4%Language:Rust 0.4%Language:Scheme 0.2%Language:C++ 0.1%Language:Python 0.0%