feat(lua)!: switch from our fork to MunifTanjim's (#2272)

also take queries from https://github.com/MunifTanjim/nvim-treesitter-lua/tree/main/queries/lua

BREAKING CHANGE: queries are not compatible; modules will have to update
This commit is contained in:
Christian Clason 2022-01-18 22:15:26 +01:00 committed by GitHub
parent 668de0951a
commit c80715f883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 189 additions and 206 deletions

View file

@ -1,53 +1,14 @@
; C Injections
(
(function_call
(field_expression
(property_identifier) @_cdef_identifier)
(arguments
(string) @c)
)
((function_call
name: [
(identifier) @_cdef_identifier
(_ _ (identifier) @_cdef_identifier)
]
arguments: (arguments (string content: _ @c)))
(#eq? @_cdef_identifier "cdef"))
(#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)
)
((function_call
name: (_) @_vimcmd_identifier
arguments: (arguments (string content: _ @vim)))
(#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_exec"))
(comment) @comment