jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
968 stars 125 forks source link

SendLineToR fails with error "unexpected numeric constant" #790

Closed alexhbnr closed 10 months ago

alexhbnr commented 10 months ago

Hello,

I am currently using Neovim v0.9.4 on Mac OS X 14.2 and the commit cb6c9ee9 and I get the following error when attempting to send code, e.g. library(tidyverse) to the terminal with SendLineToR.

> 00~library(tidyverse)01~
Error: unexpected numeric constant in "00~library(tidyverse)01"

It doesn't seem to matter whether I use the parameters stay or down or even use the function SendLineToRAndInsertOutput(). In contrast, SendParagraphToR and SendSelectionToR seem to work fine.

Any idea what could cause this behaviour?

Thanks!

jalvesaq commented 10 months ago

I can't replicate the issue on Linux (colorout library loaded, kitty as terminal emulator, and running R in a Neovim terminal buffer). Did you somehow configure Nvim-R to include 00~ at the beginning and 01~ at the end of lines before sending them to R?

alexhbnr commented 10 months ago

Thanks @jalvesaq for coming back to me so quickly. I will check whether there is something in my configuration interfering with Nvim-R.

alexhbnr commented 10 months ago

It seems that there was a collision with another plugin, which used <Leader>l<additional key>, on my system. By avoiding this collision by setting a different local leader, the issue disappeared.

Thanks @jalvesaq for the help and the ongoing commitment to this great plugin.