diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm index 6f7b97267..57ea527d4 100644 --- a/queries/lua/injections.scm +++ b/queries/lua/injections.scm @@ -114,19 +114,7 @@ (function_call (dot_index_expression field: (identifier) @_method - (#any-of? @_method "find" "match")) - arguments: (arguments - . (_) - . - (string - content: (string_content) @injection.content - (#set! injection.language "luap") - (#set! injection.include-children)))) - -(function_call - (dot_index_expression - field: (identifier) @_method - (#any-of? @_method "gmatch" "gsub")) + (#any-of? @_method "find" "match" "gmatch" "gsub")) arguments: (arguments . (_) . @@ -140,23 +128,13 @@ (function_call (method_index_expression method: (identifier) @_method - (#any-of? @_method "find" "match")) + (#any-of? @_method "find" "match" "gmatch" "gsub")) arguments: (arguments . (string content: (string_content) @injection.content (#set! injection.language "luap") (#set! injection.include-children)))) -(function_call - (method_index_expression - method: (identifier) @_method - (#any-of? @_method "gmatch" "gsub")) - arguments: (arguments - . (string - content: (string_content) @injection.content - (#set! injection.language "luap") - (#set! injection.include-children)))) - (comment content: (_) @injection.content (#set! injection.language "comment")) diff --git a/queries/luau/injections.scm b/queries/luau/injections.scm index e70e0274b..4edc7f5e4 100644 --- a/queries/luau/injections.scm +++ b/queries/luau/injections.scm @@ -16,31 +16,17 @@ (function_call (dot_index_expression field: (identifier) @_method - (#any-of? @_method "find" "format" "match")) - arguments: (arguments (_) . (string content: _ @injection.content)) - (#set! injection.language "luap")) - -(function_call - (dot_index_expression - field: (identifier) @_method - (#any-of? @_method "gmatch" "gsub")) - arguments: (arguments (_) (string content: _ @injection.content)) + (#any-of? @_method "find" "format" "match" "gmatch" "gsub")) + arguments: (arguments . (_) . (string content: _ @injection.content)) (#set! injection.language "luap")) ; ("123"):match("%d+") (function_call (method_index_expression method: (identifier) @_method - (#any-of? @_method "find" "format" "match")) + (#any-of? @_method "find" "format" "match" "gmatch" "gsub")) arguments: (arguments . (string content: _ @injection.content)) (#set! injection.language "luap")) -(function_call - (method_index_expression - method: (identifier) @_method - (#any-of? @_method "gmatch" "gsub")) - arguments: (arguments (string content: _ @injection.content)) - (#set! injection.language "luap")) - ((comment) @injection.content (#set! injection.language "comment"))