mirror of
https://github.com/helix-editor/helix
synced 2026-03-11 22:38:26 +01:00
15 lines
599 B
Scheme
15 lines
599 B
Scheme
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
; Match all 9 functions in the `re` module from the standard library that
|
|
; that takes a regex pattern as first argument.
|
|
; https://docs.python.org/3/library/re.html#functions
|
|
(call
|
|
function: (attribute
|
|
object: (identifier) @_module (#eq? @_module "re")
|
|
attribute: (identifier) @_function (#any-of? @_function "compile" "search" "match" "fullmatch" "sub" "subn" "findall" "finditer" "split"))
|
|
arguments: (argument_list
|
|
. (string
|
|
(string_content) @injection.content))
|
|
(#set! injection.language "regex"))
|