1
0
mirror of https://github.com/helix-editor/helix synced 2026-05-04 05:30:40 +02:00
Files
helix/runtime/queries/kdl/injections.scm
Erasin Wang 18ca4809ca Add tree-sitter query files for multiple languages (#15396)
- Rainbow brackets support for Dart, GDScript, KDL, and Yuck
- Indentation rules for Yuck
- Tags/definitions support for Godot resource files
2026-03-14 10:43:54 -05:00

70 lines
1.5 KiB
Scheme

; match/exclude regex with regular string
(node
(identifier) @_section_name
(#any-of? @_section_name "window-rule" "layer-rule")
children: (node_children
(node
(identifier) @_node_name
(#any-of? @_node_name "match" "exclude")
(node_field
(prop
(identifier) @_prop_name
(#any-of? @_prop_name "app-id" "title" "namespace")
(value
(string
(string_fragment) @injection.content
(#set! injection.language "regex")
)
)
)
)
)
)
)
(node
(identifier) @_section
(#eq? @_section "binds")
children: (node_children
(node
(identifier)
children: (node_children
(node
(identifier) @_action_name
(#eq? @_action_name "spawn")
(node_field
(value
(string
(string_fragment) @_executable
(#eq? @_executable "fish")
)
)
)
(node_field
(value
(string
(string_fragment) @_flag
(#eq? @_flag "-c")
)
)
)
(node_field
(value
(string
(string_fragment) @injection.content
(#set! injection.language "fish")
)
)
)
)
)
)
)
)
([
(single_line_comment)
(multi_line_comment)
] @injection.content
(#set! injection.language "comment"))