tree-sitter-todolang

Crates.iotree-sitter-todolang
lib.rstree-sitter-todolang
version0.0.1
sourcesrc
created_at2024-06-14 16:10:33.362088
updated_at2024-06-14 16:10:33.362088
descriptionTodolang grammar for tree-sitter
homepage
repositoryhttps://github.com/tree-sitter/tree-sitter-todolang
max_upload_size
id1272151
size38,115
Ghislain D. (Gnarus-G)

documentation

README

tree-sitter-todolang

todolang is being developed at part of the mynd project.

Usage (Neovim)

nvim-treesitter has the full relevant instructions.

Clone this repo into ~/projects/tree-sitter-todolang/

mkdir ~/projects/tree-sitter-todolang
git clone https://github.com/Gnarus-G/tree-sitter-todolang ~/projects/tree-sitter-todolang

Add the following to your init.lua

local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.todolang = {
  install_info = {
    url = "~/projects/tree-sitter-todolang",       -- local path or git repo
    files = { "src/parser.c" },             -- note that some parsers also require src/scanner.c or src/scanner.cc
    -- optional entries:
    branch = "main",                        -- default branch in case of git repo if different from master
    generate_requires_npm = false,          -- if stand-alone parser without npm dependencies
    requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
  },
}

vim.filetype.add({
  extension = {
    todo = "todolang",
    td = "todolang"
  }
})

And copy the contents of queries/highlights.scm from this repo to a queries folder, like .config/nvim/after/queries/todolang

"todo" @keyword

(chars) @string

[
 "{"
 "}"
] @punctuation.bracket

Then in neovimg run the command:

:TSInstall todolang

Commit count: 0

cargo fmt