#parser #incremental #icleang

yanked tree-sitter-icleang

icleang grammar for the tree-sitter parsing library

0.1.0 Jun 28, 2023

#91 in #parsing

MIT license

305KB
12K SLoC

C 11K SLoC JavaScript 201 SLoC Scheme 172 SLoC Rust 31 SLoC // 0.5% comments

tree-sitter-icelang

icelang grammar for tree-sitter

Build

# install tree-sitter-cli with cargo or npm
cargo install tree-sitter-cli
# or
npm i -g tree-sitter-cli

# generate parser
tree-sitter generate

Nvim-treesitter

To use it with nvim-treesitter put the following code in your nvim-treesitter configuration:

local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.icelang = {
  install_info = {
    url = "https://github.com/luckasRanarison/tree-sitter-icelang",
    files = { "src/parser.c" },
    branch = "master",
  },
  filetype = "icelang",
}

Then run :TSInstall icelang, nvim-treesitter doesn't actually support custom queries so you have to copy the queries in queries/neovim/ manually in your runtime path: queries/icelang/* in order to get the actual features like highlighting.

Dependencies

~2.8–4MB
~74K SLoC