From cbfe8eef894e8784a9e10127cd1c800ca9b7f532 Mon Sep 17 00:00:00 2001
From: sigmaSd <bedisnbiba@gmail.com>
Date: Tue, 15 Aug 2023 08:38:57 +0100
Subject: [PATCH] add strace highlighting (#7928)

* feat: add strace tree sitter

* f
---
 book/src/generated/lang-support.md    |  1 +
 languages.toml                        | 10 ++++++++++
 runtime/queries/strace/highlights.scm |  8 ++++++++
 3 files changed, 19 insertions(+)
 create mode 100644 runtime/queries/strace/highlights.scm

diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 10989a23..1287c11f 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -145,6 +145,7 @@
 | sql | ✓ |  |  |  |
 | sshclientconfig | ✓ |  |  |  |
 | starlark | ✓ | ✓ |  |  |
+| strace | ✓ |  |  |  |
 | svelte | ✓ |  | ✓ | `svelteserver` |
 | sway | ✓ | ✓ | ✓ | `forc` |
 | swift | ✓ |  |  | `sourcekit-lsp` |
diff --git a/languages.toml b/languages.toml
index e39871e8..1e692ac4 100644
--- a/languages.toml
+++ b/languages.toml
@@ -2783,3 +2783,13 @@ auto-format = true
 [[grammar]]
 name = "todotxt"
 source = { git = "https://github.com/arnarg/tree-sitter-todotxt", rev = "0207f6a4ab6aeafc4b091914d31d8235049a2578" }
+
+[[language]]
+name = "strace"
+scope = "source.strace"
+file-types = ["strace"]
+roots = []
+
+[[grammar]]
+name = "strace"
+source = { git = "https://github.com/sigmaSd/tree-sitter-strace", rev = "a0f6c50ae4087a9299f055d0f30fe94fd98189a4" }
diff --git a/runtime/queries/strace/highlights.scm b/runtime/queries/strace/highlights.scm
new file mode 100644
index 00000000..4f54cb3e
--- /dev/null
+++ b/runtime/queries/strace/highlights.scm
@@ -0,0 +1,8 @@
+(syscall) @function
+(integer) @constant.numeric
+(pointer) @constant.numeric
+(value) @label
+(string) @string
+(comment) @comment
+(errorName) @error
+(errorDescription) @error