mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
kdl queries: basic tag.scm and niri injections (#14401)
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
| julia | ✓ | ✓ | ✓ | | | `julia` |
|
||||
| just | ✓ | ✓ | ✓ | ✓ | | `just-lsp` |
|
||||
| kconfig | ✓ | | ✓ | | | |
|
||||
| kdl | ✓ | ✓ | ✓ | | | |
|
||||
| kdl | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| koka | ✓ | | ✓ | | | `koka` |
|
||||
| kotlin | ✓ | ✓ | ✓ | ✓ | | `kotlin-language-server` |
|
||||
| koto | ✓ | ✓ | ✓ | | | `koto-ls` |
|
||||
|
63
runtime/queries/kdl/injections.scm
Normal file
63
runtime/queries/kdl/injections.scm
Normal file
@@ -0,0 +1,63 @@
|
||||
; 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")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
3
runtime/queries/kdl/tags.scm
Normal file
3
runtime/queries/kdl/tags.scm
Normal file
@@ -0,0 +1,3 @@
|
||||
(node (identifier) @definition.struct
|
||||
children: _
|
||||
)
|
Reference in New Issue
Block a user