Skip to content

Commit

Permalink
Add pattern for Kotlin test methods. (#431)
Browse files Browse the repository at this point in the history
* Added pattern for test methods.

* Fixed test method pattern.

* Plugin version bump.
  • Loading branch information
PerilousBooklet committed Jul 19, 2024
1 parent b4a9d65 commit 2e3282b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@
"tags": [
"language"
],
"version": "0.1"
"version": "0.2"
},
{
"checksum": "08a9f8635b09a98cec9dfca8bb65f24fd7b6585c7e8308773e7ddff9a3e5a60f",
Expand Down
1 change: 1 addition & 0 deletions plugins/language_kotlin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e3282b

Please sign in to comment.