mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
feat(capnp): improve queries
This commit is contained in:
parent
ba35d094c1
commit
454876fc6d
5 changed files with 150 additions and 21 deletions
34
queries/capnp/indents.scm
Normal file
34
queries/capnp/indents.scm
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[
|
||||
(annotation_targets)
|
||||
(const_list)
|
||||
(enum)
|
||||
(interface)
|
||||
(implicit_generics)
|
||||
(generics)
|
||||
(group)
|
||||
(method_parameters)
|
||||
(named_return_types)
|
||||
(struct)
|
||||
(struct_shorthand)
|
||||
(union)
|
||||
] @indent
|
||||
|
||||
((struct_shorthand (property)) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
|
||||
((const_list (const_value)) @aligned_indent
|
||||
(#set! "delimiter" "[]"))
|
||||
|
||||
[
|
||||
"}"
|
||||
")"
|
||||
] @indent_end
|
||||
|
||||
[ "{" "}" ] @branch
|
||||
|
||||
[ "(" ")" ] @branch
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
(comment)
|
||||
] @auto
|
||||
Loading…
Add table
Add a link
Reference in a new issue