aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_d.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/language_d.lua')
-rw-r--r--plugins/language_d.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/language_d.lua b/plugins/language_d.lua
index 6788f0b..282c026 100644
--- a/plugins/language_d.lua
+++ b/plugins/language_d.lua
@@ -12,12 +12,11 @@ syntax.add {
{ pattern = { '`', '`', '\\' }, type = "string" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
- { pattern = "-?0x%x+", type = "number" },
- { pattern = "-?%d+[%d%.eE]*f?", type = "number" },
+ { pattern = "-?0x[%x_]+", type = "number" },
+ { pattern = "-?[%d_]+[%d%.eE]*f?", type = "number" },
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "[%+%-=/%*%^%%<>!~|&%$]+", type = "operator" },
- { pattern = "[%a_][%w_]*!", type = "function" }, -- highlight templates
- { pattern = "[%a_][%w_]*", type = "symbol" },
+ { pattern = "[%a_][%w_]*!?()[%(.]", type = {"function", "normal"} }, -- highlight templates
{ pattern = "@safe", type = "keyword" },
{ pattern = "@trusted", type = "keyword" },
{ pattern = "@nogc", type = "keyword" },
@@ -134,4 +133,3 @@ syntax.add {
["__parameters"] = "keyword",
},
}
-