aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_go.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/language_go.lua')
-rw-r--r--plugins/language_go.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/language_go.lua b/plugins/language_go.lua
index 93db0e4..e262af0 100644
--- a/plugins/language_go.lua
+++ b/plugins/language_go.lua
@@ -193,3 +193,40 @@ syntax.add {
},
}
+syntax.add {
+ name = "Go",
+ files = { "go%.mod" },
+ comment = "//",
+ patterns = {
+ { pattern = "//.-\n", type = "comment"},
+ { pattern = "module() %S+()",
+ type = { "keyword", "string", "normal"}
+ },
+ { pattern = "go() %S+()",
+ type = { "keyword", "string", "normal" }
+ },
+ { pattern = "%S+() v%S+()",
+ type = { "string", "keyword", "normal" }
+ },
+ },
+ symbols = {
+ ["require"] = "keyword",
+ ["module"] = "keyword",
+ ["go"] = "keyword",
+ }
+}
+
+syntax.add {
+ name = "Go",
+ files = { "go%.sum" },
+ patterns = {
+ { pattern = "%S+() v[^/]-() h1:()%S+()=",
+ type = { "string", "keyword", "normal", "string", "normal" }
+ },
+ { pattern = "%S+() v[^/]-()/%S+() h1:()%S+()=",
+ type = { "string", "keyword", "string", "normal", "string", "normal" }
+ },
+ },
+ symbols = {}
+}
+