mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
43
runtime/queries/teal/injections.scm
Normal file
43
runtime/queries/teal/injections.scm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
((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))
|
||||
(#eq? @_cdef_identifier "cdef")
|
||||
(#lua-match? @injection.content "^%[%[")
|
||||
(#offset! @injection.content 0 2 0 -2)
|
||||
(#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"))
|
||||
|
||||
; ('...'):format()
|
||||
((function_call
|
||||
(method_index
|
||||
(parenthesized_expression
|
||||
(string) @injection.content)
|
||||
key: (identifier) @_func))
|
||||
(#eq? @_func "format")
|
||||
(#set! injection.language "printf"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue