feat(treesitter): bundle query parser and queries (#22483)

skip injections for now
This commit is contained in:
Christian Clason
2023-03-03 14:27:30 +01:00
committed by GitHub
parent 74c9c413e7
commit 98e051783c
6 changed files with 50 additions and 6 deletions

View File

@@ -11,10 +11,10 @@
arguments: (arguments (string content: _ @vim)))
(#any-of? @_vimcmd_identifier "vim.cmd" "vim.api.nvim_command" "vim.api.nvim_exec" "vim.api.nvim_cmd"))
; ((function_call
; name: (_) @_vimcmd_identifier
; arguments: (arguments (string content: _ @query) .))
; (#eq? @_vimcmd_identifier "vim.treesitter.query.set_query"))
((function_call
name: (_) @_vimcmd_identifier
arguments: (arguments (string content: _ @query) .))
(#eq? @_vimcmd_identifier "vim.treesitter.query.set_query"))
; ;; highlight string as query if starts with `;; query`
; ((string ("string_content") @query) (#lua-match? @query "^%s*;+%s?query"))