mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 20:10:10 -04:00
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
39 lines
1.1 KiB
Scheme
39 lines
1.1 KiB
Scheme
(macro_invocation
|
|
(token_tree) @injection.content (#set! injection.language "rust"))
|
|
|
|
(macro_definition
|
|
(macro_rule
|
|
left: (token_tree_pattern) @injection.content
|
|
(#set! injection.language "rust")))
|
|
|
|
(macro_definition
|
|
(macro_rule
|
|
right: (token_tree) @injection.content
|
|
(#set! injection.language "rust")))
|
|
|
|
([
|
|
(line_comment)
|
|
(block_comment)
|
|
] @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
((macro_invocation
|
|
macro: ((identifier) @injection.language)
|
|
(token_tree) @injection.content)
|
|
(#eq? @injection.language "html"))
|
|
|
|
(call_expression
|
|
function: (scoped_identifier
|
|
path: (identifier) @_regex (#eq? @_regex "Regex")
|
|
name: (identifier) @_new (#eq? @_new "new"))
|
|
arguments: (arguments
|
|
(raw_string_literal) @injection.content)
|
|
(#set! injection.language "regex"))
|
|
|
|
(call_expression
|
|
function: (scoped_identifier
|
|
path: (scoped_identifier (identifier) @_regex (#eq? @_regex "Regex").)
|
|
name: (identifier) @_new (#eq? @_new "new"))
|
|
arguments: (arguments
|
|
(raw_string_literal) @injection.content)
|
|
(#set! injection.language "regex"))
|