From 4144c9d2f2e712475d0ee54d029653f2c7dffff5 Mon Sep 17 00:00:00 2001 From: ttys3 Date: Thu, 21 Apr 2022 00:16:02 +0800 Subject: feat(lang): add go.mod and go.work support (#2197) --- runtime/queries/gomod/highlights.scm | 17 +++++++++++++++++ runtime/queries/gomod/injections.scm | 2 ++ runtime/queries/gowork/highlights.scm | 14 ++++++++++++++ runtime/queries/gowork/injections.scm | 2 ++ 4 files changed, 35 insertions(+) create mode 100644 runtime/queries/gomod/highlights.scm create mode 100644 runtime/queries/gomod/injections.scm create mode 100644 runtime/queries/gowork/highlights.scm create mode 100644 runtime/queries/gowork/injections.scm (limited to 'runtime') 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")) -- cgit v1.2.3-70-g09d2