feat(query): indents that reflect the formatter (#6154)

* feat(query): indents that reflect the formatter

Indentation queries that reflect the query formatter. Only applicable if `lispoptions=expr:1`
This commit is contained in:
Riley Bruins 2024-02-21 01:47:09 -08:00 committed by GitHub
parent 01cdcfb216
commit 455f6586ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 83 additions and 5 deletions

View file

@ -1,8 +1,20 @@
(list) @indent.begin
[
(list)
(named_node)
(grouping)
(predicate) ; WIP to newline wrap any-of?
"["
"]"
] @indent.begin
"]" @indent.branch
; ERROR node indents
(ERROR
"(") @indent.begin
"]" @indent.branch @indent.end
")" @indent.end
; Captures always mark the end of a node
; Because of that, mark it as indent.end
(capture
name: (identifier) @indent.end)