aboutsummaryrefslogtreecommitdiffstats
path: root/queries/luau
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2023-12-23 13:01:41 -0800
committerChristian Clason <c.clason@uni-graz.at>2023-12-23 22:26:02 +0100
commitcd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5 (patch)
tree54c77e1e57adfd131855c55f76574141e16149bc /queries/luau
parentfeat: more `@string.regex` highlights (diff)
downloadnvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar.gz
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar.bz2
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar.lz
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar.xz
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.tar.zst
nvim-treesitter-cd4de5f7b14b878ac8f5c459c9d579cc58ba1ac5.zip
fix: cleanup luap injection queries
Diffstat (limited to 'queries/luau')
-rw-r--r--queries/luau/injections.scm20
1 files changed, 3 insertions, 17 deletions
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"))