Open typhooncamel opened 3 months ago
Looks like the issue is there:
https://github.com/R-nvim/R.nvim/blob/cb65c3b288d22212e248d2cb8bf3ca46baa7201c/lua/r/cursor.lua#L23
This is a feature, not a bug. Someone in the past asked for this. The goal is to be able to send sample code from the ROxygen comment area, but any change in this behavior will be good for me. We can remove the feature, create an option to disable it, or leave it as is.
Ok, good to know. I'm happy either way, at least knowing that's the expected behaviour. I'd say it's a bit odd (because it prevents you from doing precisely what I was doing, sending whole blocks). Testing code in the ROxygen comment area seems somewhat niche. However, I'm happy with whatever the consensus is.
If there are roxygen2-type comments (preceded by
#'
) and these are part of a selection being sent to the R console, there will be an error. E.g., if you haveand you visually select the two functions and send to the R session, I get
Error: unexpected symbol in " Another function."
.