chore: query formatting

This commit is contained in:
Pham Huy Hoang 2024-01-06 15:05:50 +09:00 committed by Christian Clason
parent 79975d6557
commit 57a8acf0c4
674 changed files with 18466 additions and 12648 deletions

View file

@ -1,47 +1,42 @@
(
(function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content)
)
((function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content))
(#eq? @_cdef_identifier "cdef")
(#lua-match? @injection.content "^[\"']")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "c")
)
(
(function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content)
)
(#set! injection.language "c"))
((function_call
(index
(identifier) @_cdef_identifier)
(arguments
(string) @injection.content))
(#eq? @_cdef_identifier "cdef")
(#lua-match? @injection.content "^%[%[")
(#offset! @injection.content 0 2 0 -2)
(#set! injection.language "c")
)
(#set! injection.language "c"))
; string.format('...')
((function_call
(index
(identifier) @_base
key: (identifier) @_entry)
(arguments . (string) @injection.content))
(#eq? @_base "string")
(#eq? @_entry "format")
(#set! injection.language "printf"))
(arguments
.
(string) @injection.content))
(#eq? @_base "string")
(#eq? @_entry "format")
(#set! injection.language "printf"))
; ('...'):format()
((function_call
(method_index (string) @printf
(method_index
(string) @printf
key: (identifier) @_func))
(#eq? @_func "format")
(#set! injection.language "printf"))
(#eq? @_func "format")
(#set! injection.language "printf"))
((comment) @injection.content
(#set! injection.language "comment"))
(#set! injection.language "comment"))