mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-23 01:46:18 +04:00
26 lines
634 B
Scheme
26 lines
634 B
Scheme
|
;; From nvim-treesitter, contributed by @ObserverOfTime et al.
|
||
|
|
||
|
((comment) @injection.content
|
||
|
(#set! injection.language "comment"))
|
||
|
|
||
|
; test(val)
|
||
|
(query
|
||
|
((funcname) @_function
|
||
|
(#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub"))
|
||
|
(args
|
||
|
.
|
||
|
(query
|
||
|
(string) @injection.content
|
||
|
(#set! injection.language "regex"))))
|
||
|
|
||
|
; test(regex; flags)
|
||
|
(query
|
||
|
((funcname) @_function
|
||
|
(#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub"))
|
||
|
(args
|
||
|
.
|
||
|
(args
|
||
|
(query
|
||
|
(string) @injection.content
|
||
|
(#set! injection.language "regex")))))
|