mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 17:00:09 -04:00
fix(r): adapt indent queries
- Anchor parameter query. There's no need for multiple indent.align captures - Narrow down binary_operator indent.begin. From tree-sitter-r corpus and highlight tests, this seems to be appropriate.
This commit is contained in:
parent
c11d49cbef
commit
3e535e826d
2 changed files with 6 additions and 7 deletions
|
|
@ -12,7 +12,8 @@
|
|||
] @indent.begin
|
||||
|
||||
(binary_operator
|
||||
operator: (_)) @indent.begin
|
||||
rhs: (_) @_no_indent
|
||||
(#not-kind-eq? @_no_indent function_definition)) @indent.begin
|
||||
|
||||
[
|
||||
"}"
|
||||
|
|
@ -20,6 +21,7 @@
|
|||
] @indent.branch
|
||||
|
||||
((parameters
|
||||
.
|
||||
(parameter
|
||||
name: (identifier))) @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue