mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: cleanup luap injection queries
This commit is contained in:
parent
92572c0dfd
commit
cd4de5f7b1
2 changed files with 5 additions and 41 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue