Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR feedback addressed on multi tag predicate scenario
Browse files Browse the repository at this point in the history
mkatychev committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 30bd543 commit 3aaacbf
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion topiary-cli/tests/samples/expected/tree_sitter_query.scm
Original file line number Diff line number Diff line change
@@ -1513,7 +1513,7 @@
; Predicate parameter newline separatation and indentation
; ================================================================================

(#any-of? @function.builtin
(#any-of? @function.builtin @foo
"union"
"difference"
"intersection"
4 changes: 2 additions & 2 deletions topiary-cli/tests/samples/input/tree_sitter_query.scm
Original file line number Diff line number Diff line change
@@ -1514,9 +1514,9 @@
; Predicate parameter newline separatation and indentation
; ================================================================================

(#any-of? @function.builtin "union" "difference" "intersection"
(#any-of? @function.builtin @foo "union" "difference" "intersection"
"circle")

(#set!
injection.language
injection.language
"doxygen")
18 changes: 14 additions & 4 deletions topiary-queries/queries/tree_sitter_query.scm
Original file line number Diff line number Diff line change
@@ -55,11 +55,21 @@
; Add softlines and indentation after parameter capture groups and identifiers.
(predicate
(parameters
[(identifier) (capture)]+ @append_spaced_softline @append_indent_start
(_)* @append_spaced_softline
.
(_) @append_indent_end @append_empty_softline
[(identifier) (capture)] @append_spaced_softline @append_indent_start
.
(string)
) @append_indent_end
)

(predicate
(parameters
(string) @append_empty_softline
)
)

(predicate
(parameters
(_) @prepend_space
)
)
(predicate

0 comments on commit 3aaacbf

Please sign in to comment.