tree-sitter-todolang
June 28, 2024 ยท View on GitHub
todolang is being developed at part of the mynd project.
Usage (Neovim)
Add the following to your init.lua
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.todolang = {
install_info = {
url = "https://github.com/Gnarus-G/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