summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnar Gauti Ingason <arnarg@fastmail.com>2022-02-28 14:07:23 +0100
committerKiyan <yazdani.kiyan@protonmail.com>2022-02-28 22:46:47 +0100
commit202cbc10ad1ac3619b649beae32c2349aa241577 (patch)
tree2a1482b69dc58645d78e5a5fe958e0e71c0bc111
parent4d7580099155065f196a12d7fab412e9eb1526df (diff)
parsers: Add todotxt parser
-rw-r--r--lua/nvim-treesitter/parsers.lua11
-rw-r--r--queries/todotxt/highlights.scm6
2 files changed, 17 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 8b7ebc04..3c8cc8da 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -411,6 +411,17 @@ list.c_sharp = {
maintainers = { "@Luxed" },
}
+list.todotxt = {
+ install_info = {
+ url = "https://github.com/arnarg/tree-sitter-todotxt.git",
+ files = { "src/parser.c" },
+ branch = "main",
+ },
+ filetype = "todotxt",
+ maintainers = { "@arnarg" },
+ experimental = true,
+}
+
list.typescript = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-typescript",
diff --git a/queries/todotxt/highlights.scm b/queries/todotxt/highlights.scm
new file mode 100644
index 00000000..37f91b8a
--- /dev/null
+++ b/queries/todotxt/highlights.scm
@@ -0,0 +1,6 @@
+(done_task) @comment
+(task (priority) @keyword)
+(task (date) @comment)
+(task (kv) @comment)
+(task (project) @string)
+(task (context) @type)