nvim-treesitter/queries/ruby/injections.scm

24 lines
582 B
Scheme
Raw Normal View History

2024-01-06 15:05:50 +09:00
((comment) @injection.content
(#set! injection.language "comment"))
(heredoc_body
2024-01-06 15:05:50 +09:00
(heredoc_content) @injection.content
(heredoc_end) @injection.language
(#downcase! @injection.language))
2022-11-26 14:27:21 +02:00
2024-01-06 15:05:50 +09:00
(regex
(string_content) @injection.content
(#set! injection.language "regex"))
((call
receiver: (identifier) @_receiver
method: (identifier) @_method
arguments: (argument_list
(pair
key: (hash_key_symbol)
value: (string
(string_content) @injection.content))))
(#eq? @_receiver "binding")
(#any-of? @_method "b" "break")
(#set! injection.self))