summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Neubauer2021-12-20 02:42:23 +0000
committerGitHub2021-12-20 02:42:23 +0000
commit23091c9d29f575379d01b7011890da044a302433 (patch)
tree996a4379ae7f69afff86cd4aac406ad43cb73bae
parente72786df8eae5684c0330be18f190a33f516da76 (diff)
Highlight comments in c, cpp, cmake and llvm (#1309)
Also, reuse the c injections in glsl
-rw-r--r--runtime/queries/c/injections.scm2
-rw-r--r--runtime/queries/cmake/injections.scm4
-rw-r--r--runtime/queries/cpp/injections.scm1
-rw-r--r--runtime/queries/glsl/injections.scm5
-rw-r--r--runtime/queries/llvm/injections.scm2
5 files changed, 11 insertions, 3 deletions
diff --git a/runtime/queries/c/injections.scm b/runtime/queries/c/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/c/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/runtime/queries/cmake/injections.scm b/runtime/queries/cmake/injections.scm
new file mode 100644
index 00000000..6cb6c254
--- /dev/null
+++ b/runtime/queries/cmake/injections.scm
@@ -0,0 +1,4 @@
+((line_comment) @injection.content
+ (#set! injection.language "comment"))
+((bracket_comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/runtime/queries/cpp/injections.scm b/runtime/queries/cpp/injections.scm
new file mode 100644
index 00000000..a5a5208c
--- /dev/null
+++ b/runtime/queries/cpp/injections.scm
@@ -0,0 +1 @@
+; inherits: c
diff --git a/runtime/queries/glsl/injections.scm b/runtime/queries/glsl/injections.scm
index b01b8b4b..6330ea3e 100644
--- a/runtime/queries/glsl/injections.scm
+++ b/runtime/queries/glsl/injections.scm
@@ -1,5 +1,4 @@
+; inherits: c
+
((preproc_arg) @injection.content
(#set! injection.language "glsl"))
-
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/runtime/queries/llvm/injections.scm b/runtime/queries/llvm/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/llvm/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))