From 92c0069ae603fa9cc8dc3493570aab55d1f753ee Mon Sep 17 00:00:00 2001 From: PerilousBooklet Date: Sat, 20 Apr 2024 19:22:59 +0200 Subject: Add import pattern for Groovy. (#425) * Added import pattern. * Fixed spacing. * Bumped version. * Fix versions. * Fixed meta_languages version. --- manifest.json | 2 +- plugins/language_groovy.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3b1b936..b4bb072 100644 --- a/manifest.json +++ b/manifest.json @@ -1038,7 +1038,7 @@ "tags": [ "language" ], - "version": "0.1" + "version": "0.2" }, { "description": "Syntax for the [Hare](https://harelang.org) programming language", diff --git a/plugins/language_groovy.lua b/plugins/language_groovy.lua index 8a3c5b8..2886e10 100644 --- a/plugins/language_groovy.lua +++ b/plugins/language_groovy.lua @@ -24,6 +24,7 @@ syntax.add { { pattern = "[%a_][%w_]*%f[(]", type = "function" }, -- Function/Class/Method/... { pattern = "[%a_][%w_]*%f[%[]", type = "function" }, -- Custom Type { regex = "[A-Z]+_?[A-Z]+", type = "keyword2" }, -- Constants + { pattern = "import()%s+()[%w_.]+", type = { "keyword", "normal", "normal" } }, { pattern = "[%a_][%w_]*", type = "symbol" }, -- ? { pattern = "[a-zA-Z]+%.+", type = "function" }, -- Lib path -- TODO: .class. -- cgit v1.2.3