Crates.io | tree-sitter-todolang |
lib.rs | tree-sitter-todolang |
version | 0.0.1 |
source | src |
created_at | 2024-06-14 16:10:33.362088 |
updated_at | 2024-06-14 16:10:33.362088 |
description | Todolang grammar for tree-sitter |
homepage | |
repository | https://github.com/tree-sitter/tree-sitter-todolang |
max_upload_size | |
id | 1272151 |
size | 38,115 |
todolang
is being developed at part of the mynd project.
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