mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
Extend injections for Lua to use query parser
This commit is contained in:
parent
f8595b13bf
commit
1e8ad621a5
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
((function_call
|
((function_call
|
||||||
name: (_) @_vimcmd_identifier
|
name: (_) @_vimcmd_identifier
|
||||||
arguments: (arguments (string content: _ @query) .))
|
arguments: (arguments (string content: _ @query) .))
|
||||||
(#eq? @_vimcmd_identifier "vim.treesitter.query.set_query"))
|
(#any-of? @_vimcmd_identifier "vim.treesitter.query.set_query" "vim.treesitter.query.parse_query"))
|
||||||
|
|
||||||
;; highlight string as query if starts with `;; query`
|
;; highlight string as query if starts with `;; query`
|
||||||
((string ("string_content") @query) (#lua-match? @query "^%s*;+%s?query"))
|
((string ("string_content") @query) (#lua-match? @query "^%s*;+%s?query"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue