From 2e3282b88b2cce66d98c9cde19ce7a5697808f3c Mon Sep 17 00:00:00 2001 From: PerilousBooklet Date: Sat, 20 Jul 2024 01:55:00 +0200 Subject: Add pattern for Kotlin test methods. (#431) * Added pattern for test methods. * Fixed test method pattern. * Plugin version bump. --- manifest.json | 2 +- plugins/language_kotlin.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 9006dc2..f8233b2 100644 --- a/manifest.json +++ b/manifest.json @@ -1188,7 +1188,7 @@ "tags": [ "language" ], - "version": "0.1" + "version": "0.2" }, { "checksum": "08a9f8635b09a98cec9dfca8bb65f24fd7b6585c7e8308773e7ddff9a3e5a60f", diff --git a/plugins/language_kotlin.lua b/plugins/language_kotlin.lua index 288ba34..c3d6b4f 100644 --- a/plugins/language_kotlin.lua +++ b/plugins/language_kotlin.lua @@ -22,6 +22,7 @@ syntax.add { { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, -- Operators { regex = [[\?(?=\.)]], type = "operator" }, -- ?. operator { pattern = "[%a_][%w_]*%f[(]", type = "function" }, -- Function/Method/Class + { regex = "`[\\w_\\s]+`(?=\\s*\\()", type = "function" }, -- Test Method { regex = [[let(?=\s\{)]], type = "function" }, -- ? operator { regex = [[\?\:(?=\s?)]], type = "operator" }, -- elvis operator { regex = [[this(?=\.?\@?)]], type = "keyword" }, -- this keyword -- cgit v1.2.3