diff options
| author | Phạm Huy Hoàng <hoangtun0810@gmail.com> | 2024-06-29 00:26:38 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-06-28 18:13:12 +0200 |
| commit | 3e535e826da265748b875b18dbfb361bd1a1701c (patch) | |
| tree | d448a0bb04af9a99a01b904ed4f014b3d5ad2155 /queries/r | |
| parent | bot(lockfile): update idl, xcompose (diff) | |
| download | nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar.gz nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar.bz2 nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar.lz nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar.xz nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.tar.zst nvim-treesitter-3e535e826da265748b875b18dbfb361bd1a1701c.zip | |
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.
Diffstat (limited to 'queries/r')
| -rw-r--r-- | queries/r/indents.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/queries/r/indents.scm b/queries/r/indents.scm index 86acddc5f..600214eaf 100644 --- a/queries/r/indents.scm +++ b/queries/r/indents.scm @@ -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 "(") |
