wip: everything installs but no highlights yet?

This commit is contained in:
purarue 2025-09-11 13:00:33 -07:00
parent 7f8dd2e48b
commit dc6ee3b498
4 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,22 @@
(comment) @comment @spell
[
","
";"
] @punctuation.delimiter
"=" @operator
(binary_condition_identifier) @keyword
(unary_condition_identifier) @keyword
(condition_expression
(binary_condition_expression
(binary_condition_identifier) @kw_name
(identifier) @number)
(#eq? @kw_name "number"))
(ask) @function.builtin
(string) @string

View file

@ -0,0 +1,14 @@
; These are all interpreted as regex when evaluated
; https://github.com/ranger/ranger/blob/38bb8901004b75a407ffee4b9e176bc0a436cb15/ranger/ext/rifle.py#L273-L282
(binary_condition_expression
(binary_condition_identifier) @rc_keyword
(identifier) @injection.content
(#any-of? @rc_keyword "match" "ext" "mime" "name" "path" "has" "env" "label")
(#set! injection.language "regex"))
; highlight any commands using the bash tree-sitter parser
(command_list
(command) @injection.content
(#set! injection.include-children)
(#set! injection.language "bash"))