mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
indents(r): add indents support
This commit is contained in:
parent
3f876efce5
commit
807b20d0de
1 changed files with 36 additions and 0 deletions
36
queries/r/indents.scm
Normal file
36
queries/r/indents.scm
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
[
|
||||||
|
(call)
|
||||||
|
(brace_list)
|
||||||
|
(function_definition (brace_list))
|
||||||
|
(paren_list)
|
||||||
|
(special)
|
||||||
|
"|>"
|
||||||
|
"if"
|
||||||
|
"else"
|
||||||
|
"while"
|
||||||
|
"repeat"
|
||||||
|
"for"
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
[
|
||||||
|
"}"
|
||||||
|
")"
|
||||||
|
] @branch
|
||||||
|
|
||||||
|
|
||||||
|
(pipe
|
||||||
|
(call) @aligned_indent
|
||||||
|
(#set! "delimiter" "()"))
|
||||||
|
|
||||||
|
((special)
|
||||||
|
(call) @aligned_indent
|
||||||
|
(#set! "delimiter" "()"))
|
||||||
|
|
||||||
|
[
|
||||||
|
")"
|
||||||
|
"}"
|
||||||
|
] @indent_end
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
] @ignore
|
||||||
Loading…
Add table
Add a link
Reference in a new issue