From c0eae84073ccbf09955f546cbad889e7c1487984 Mon Sep 17 00:00:00 2001
From: Jan9103 <55753387+Jan9103@users.noreply.github.com>
Date: Wed, 9 Aug 2023 15:35:29 +0200
Subject: [PATCH] feat: add todo.txt tree-sitter (#7835)

---
 book/src/generated/lang-support.md     |  1 +
 languages.toml                         | 11 +++++++++++
 runtime/queries/todotxt/highlights.scm |  6 ++++++
 3 files changed, 18 insertions(+)
 create mode 100644 runtime/queries/todotxt/highlights.scm

diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 38d4d9e9..572654bd 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -149,6 +149,7 @@
 | tablegen | ✓ | ✓ | ✓ |  |
 | task | ✓ |  |  |  |
 | tfvars | ✓ |  | ✓ | `terraform-ls` |
+| todotxt | ✓ |  |  |  |
 | toml | ✓ |  |  | `taplo` |
 | tsq | ✓ |  |  |  |
 | tsx | ✓ | ✓ | ✓ | `typescript-language-server` |
diff --git a/languages.toml b/languages.toml
index 618b18c1..20be5495 100644
--- a/languages.toml
+++ b/languages.toml
@@ -2736,3 +2736,14 @@ indent = { tab-width = 4, unit = "    " }
 name = "unison"
 source = { git = "https://github.com/kylegoetz/tree-sitter-unison", rev = "98c4e8bc5c9f5989814a720457cf36963cf4043d" }
 
+[[language]]
+name = "todotxt"
+scope = "text.todotxt"
+file-types = [{ suffix = ".todo.txt" }, "todotxt"]
+roots = []
+formatter = { command = "sort" }
+auto-format = true
+
+[[grammar]]
+name = "todotxt"
+source = { git = "https://github.com/arnarg/tree-sitter-todotxt", rev = "0207f6a4ab6aeafc4b091914d31d8235049a2578" }
diff --git a/runtime/queries/todotxt/highlights.scm b/runtime/queries/todotxt/highlights.scm
new file mode 100644
index 00000000..37f91b8a
--- /dev/null
+++ b/runtime/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)