From 5c325fe342c26f31df495ec478a1d427270e8e42 Mon Sep 17 00:00:00 2001 From: cgahr Date: Fri, 3 Nov 2023 22:21:54 +0100 Subject: replace kdl tree-sitter to fix highlighting (#8652) * replace kdl tree-sitter * kdl: adopt highlights for new tree-sitter * kdl: add indent queries * kdl: add textobjects * kdl: improve syntax highlighting * kdl: update lang-support * kdl: make indents more concise --------- Co-authored-by: Constantin Gahr --- runtime/queries/kdl/textobjects.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 runtime/queries/kdl/textobjects.scm (limited to 'runtime/queries/kdl/textobjects.scm') 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 + -- cgit v1.2.3-70-g09d2