mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
53 lines
987 B
Scheme
53 lines
987 B
Scheme
; C Injections
|
|
(
|
|
(function_call
|
|
(field_expression
|
|
(property_identifier) @_cdef_identifier)
|
|
(arguments
|
|
(string) @c)
|
|
)
|
|
|
|
(#eq? @_cdef_identifier "cdef")
|
|
(#lua-match? @c "^[\"']")
|
|
(#offset! @c 0 1 0 -1)
|
|
)
|
|
|
|
(
|
|
(function_call
|
|
(field_expression
|
|
(property_identifier) @_cdef_identifier)
|
|
(arguments
|
|
(string) @c)
|
|
)
|
|
|
|
(#eq? @_cdef_identifier "cdef")
|
|
(#lua-match? @c "^%[%[")
|
|
(#offset! @c 0 2 0 -2)
|
|
)
|
|
|
|
; Vimscript Injections
|
|
(
|
|
(function_call
|
|
(field_expression) @_vimcmd_identifier
|
|
(arguments
|
|
(string) @vim)
|
|
)
|
|
|
|
(#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_exec")
|
|
(#lua-match? @vim "^[\"']")
|
|
(#offset! @vim 0 1 0 -1)
|
|
)
|
|
|
|
(
|
|
(function_call
|
|
(field_expression) @_vimcmd_identifier
|
|
(arguments
|
|
(string) @vim)
|
|
)
|
|
|
|
(#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_exec")
|
|
(#lua-match? @vim "^%[%[")
|
|
(#offset! @vim 0 2 0 -2)
|
|
)
|
|
|
|
(comment) @comment
|