diff options
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/kdl/highlights.scm | 8 | ||||
-rw-r--r-- | runtime/queries/kdl/indents.scm | 3 | ||||
-rw-r--r-- | runtime/queries/kdl/textobjects.scm | 27 |
3 files changed, 34 insertions, 4 deletions
diff --git a/runtime/queries/kdl/highlights.scm b/runtime/queries/kdl/highlights.scm index d83bde19..78e5acf4 100644 --- a/runtime/queries/kdl/highlights.scm +++ b/runtime/queries/kdl/highlights.scm @@ -1,12 +1,12 @@ -(comment) @comment (single_line_comment) @comment +(multi_line_comment) @comment (node - name: (identifier) @function) + (identifier) @variable) + (prop (identifier) @attribute) -(type) @type -(bare_identifier) @variable.other.member +(type (_) @type) @punctuation.bracket (keyword) @keyword diff --git a/runtime/queries/kdl/indents.scm b/runtime/queries/kdl/indents.scm new file mode 100644 index 00000000..bc2ffc15 --- /dev/null +++ b/runtime/queries/kdl/indents.scm @@ -0,0 +1,3 @@ +(node_children) @indent + + "}" @outdent diff --git a/runtime/queries/kdl/textobjects.scm b/runtime/queries/kdl/textobjects.scm new file mode 100644 index 00000000..7f9a562c --- /dev/null +++ b/runtime/queries/kdl/textobjects.scm @@ -0,0 +1,27 @@ +(type (_) @test.inside) @test.around + +(node + children: (node_children)? @class.inside) @class.around + +(node + children: (node_children)? @function.inside) @function.around + +(node (identifier) @function.movement) + +[ + (single_line_comment) + (multi_line_comment) +] @comment.inside + +[ + (single_line_comment)+ + (multi_line_comment)+ +] @comment.around + +[ + (prop) + (value) +] @parameter.inside + +(value (type) ? (_) @parameter.inside @parameter.movement . ) @parameter.around + |