R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
155 stars 16 forks source link

Use M.source_lines instead of M.cmd so we can send lines that contains function call spread over multiple lines #33

Closed PMassicotte closed 7 months ago

PMassicotte commented 7 months ago

For example, sending these lines (using send above) was not working:

library(tidyverse)

mtcars |>
  head() |>
  mutate(
    drat = drat / 2, hp
  ) |>
  mutate(y = 1 + 1)

Because the mutate() call was spread over 3 lines, and each of these line were sent separately to the terminal.

jalvesaq commented 7 months ago

Thanks!