mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
Scheme
40 lines
1.4 KiB
Scheme
; mark arbitary languages with a comment
|
|
((((comment) @injection.language) .
|
|
(indented_string_expression (string_fragment) @injection.content))
|
|
(#set! injection.combined))
|
|
|
|
((binding
|
|
attrpath: (attrpath (identifier) @_path)
|
|
expression: (indented_string_expression
|
|
(string_fragment) @injection.content))
|
|
(#match? @_path "(^\\w*Phase|(pre|post)\\w*|(.*\\.)?\\w*([sS]cript|[hH]ook)|(.*\\.)?startup)$")
|
|
(#set! injection.language "bash")
|
|
(#set! injection.combined))
|
|
|
|
((apply_expression
|
|
function: (apply_expression function: (_) @_func)
|
|
argument: (indented_string_expression (string_fragment) @injection.content))
|
|
(#match? @_func "(^|\\.)writeShellScript(Bin)?$")
|
|
(#set! injection.language "bash")
|
|
(#set! injection.combined))
|
|
|
|
(apply_expression
|
|
(apply_expression
|
|
function: (apply_expression
|
|
function: ((_) @_func)))
|
|
argument: (indented_string_expression (string_fragment) @injection.content)
|
|
(#match? @_func "(^|\\.)runCommand(((No)?(CC))?(Local)?)?$")
|
|
(#set! injection.language "bash")
|
|
(#set! injection.combined))
|
|
|
|
(apply_expression
|
|
function: ((_) @_func)
|
|
argument: (_ (_)* (_ (_)* (binding
|
|
attrpath: (attrpath (identifier) @_path)
|
|
expression: (indented_string_expression
|
|
(string_fragment) @injection.content))))
|
|
(#match? @_func "(^|\\.)writeShellApplication$")
|
|
(#match? @_path "^text$")
|
|
(#set! injection.language "bash")
|
|
(#set! injection.combined))
|