aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_d.lua8
2 files changed, 4 insertions, 6 deletions
diff --git a/manifest.json b/manifest.json
index e21e8b9..320f1bb 100644
--- a/manifest.json
+++ b/manifest.json
@@ -447,7 +447,7 @@
},
{
"description": "Syntax for the [D](https://dlang.org/) programming language",
- "version": "0.1",
+ "version": "0.2",
"path": "plugins/language_d.lua",
"id": "language_d",
"mod_version": "3"
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",
},
}
-