jalvesaq / R-Vim-runtime

Vim runtime scripts of file types that include R code
GNU General Public License v2.0
24 stars 28 forks source link

indentation in pipeline with multi-line function calls #52

Closed joepax closed 1 year ago

joepax commented 1 year ago

Hi There. I'm running the current development version of Nvim-R with the current development version of R-Vim-runtime within Vim 9.0. Indentation within a pipeline that contains multi-line function calls doesn't work as expected. Here's what I would expect:

df |> summarize(m_foo = mean(foo), s_foo = sd(foo)) |> glimpse()

Here is the behavior I observe:

df |> summarize(m_foo = mean(foo), s_foo = sd(foo)) |> glimpse()

Note that the "glimpse()" in the first case (as expected) is properly indented after hitting return following the pipe, while the "glimpse()" in the second case (as observed) is not properly indented after hitting return following the pipe.

I've also tried this with the magrittr pipe (%>%) and I observe the same unexpected behavior (i.e., no indent).

Thanks for taking the time to consider this issue.

joepax commented 1 year ago

Apologies. I see now that this is addressed in the readme. Closing the issue.