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.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/language_go.lua b/plugins/language_go.lua
index e1c96b2..0532784 100644
--- a/plugins/language_go.lua
+++ b/plugins/language_go.lua
@@ -18,7 +18,8 @@ syntax.add {
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
{ pattern = ":=", type = "operator" },
- { pattern = "[%a_][%w_]*%f[(]", type = "function" },
+ { pattern = "[%a_][%w_]*%f[(]", type = "function" }, -- function call
+ { pattern = "func()[%s].*[%a_][%w_]*()%f[%[(]", type = {"keyword", "function", "normal"} }, -- function statement
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
@@ -35,8 +36,8 @@ syntax.add {
["const"] = "keyword",
["package"] = "keyword",
["import"] = "keyword",
- ["func"] = "keyword",
["var"] = "keyword",
+ ["func"] = "keyword",
["type"] = "keyword",
["interface"] = "keyword",
["select"] = "keyword",