From 92572c0dfd53b0e74bf436ef968ecc5b5a7e2b76 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Thu, 21 Dec 2023 15:31:40 -0800 Subject: feat: more `@string.regex` highlights --- queries/lua/highlights.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'queries/lua') diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 1af8e9aec..2f12d3ce2 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -247,3 +247,23 @@ (string) @string (escape_sequence) @string.escape + +; string.match("123", "%d+") +(function_call + (dot_index_expression + field: (identifier) @_method + (#any-of? @_method "find" "match" "gmatch" "gsub")) + arguments: (arguments + . (_) + . + (string + content: (string_content) @string.regex))) + +;("123"):match("%d+") +(function_call + (method_index_expression + method: (identifier) @_method + (#any-of? @_method "find" "match" "gmatch" "gsub")) + arguments: (arguments + . (string + content: (string_content) @string.regex))) -- cgit v1.2.3-70-g09d2