aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
diff options
context:
space:
mode:
authorttys32022-04-20 16:16:02 +0000
committerGitHub2022-04-20 16:16:02 +0000
commit4144c9d2f2e712475d0ee54d029653f2c7dffff5 (patch)
tree1b2a61b218abe9870f0793c56f7025e5ebbc2e7c /runtime/queries
parent8d335f63f00755c33721b656f289357d3bd5dfb7 (diff)
feat(lang): add go.mod and go.work support (#2197)
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/gomod/highlights.scm17
-rw-r--r--runtime/queries/gomod/injections.scm2
-rw-r--r--runtime/queries/gowork/highlights.scm14
-rw-r--r--runtime/queries/gowork/injections.scm2
4 files changed, 35 insertions, 0 deletions
diff --git a/runtime/queries/gomod/highlights.scm b/runtime/queries/gomod/highlights.scm
new file mode 100644
index 00000000..63e1f012
--- /dev/null
+++ b/runtime/queries/gomod/highlights.scm
@@ -0,0 +1,17 @@
+[
+ "require"
+ "replace"
+ "go"
+ "exclude"
+ "retract"
+ "module"
+] @keyword
+
+"=>" @operator
+
+(comment) @comment
+
+[
+(version)
+(go_version)
+] @string
diff --git a/runtime/queries/gomod/injections.scm b/runtime/queries/gomod/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/gomod/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))
diff --git a/runtime/queries/gowork/highlights.scm b/runtime/queries/gowork/highlights.scm
new file mode 100644
index 00000000..9c84bcc4
--- /dev/null
+++ b/runtime/queries/gowork/highlights.scm
@@ -0,0 +1,14 @@
+[
+ "replace"
+ "go"
+ "use"
+] @keyword
+
+"=>" @operator
+
+(comment) @comment
+
+[
+(version)
+(go_version)
+] @string
diff --git a/runtime/queries/gowork/injections.scm b/runtime/queries/gowork/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/gowork/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))