Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve statement range provider in roxygen comments #5423

Open
juliasilge opened this issue Nov 20, 2024 · 1 comment
Open

Improve statement range provider in roxygen comments #5423

juliasilge opened this issue Nov 20, 2024 · 1 comment
Labels
enhancement New feature or request lang: r support
Milestone

Comments

@juliasilge
Copy link
Contributor

I am not sure if here is the best place to comment, but I noticed a small bug with the roxygen annotations, when issuing ctrl+enter to run the next expression. Only in particular cases, such as when the roxygen annotation is not the first comment in a given section, it works as expected (or as I am used to from RStudio), otherwise, each roxygen annotation line is sent to the console line by line. Please see the screencast that shows what I mean.

I didn't know about plumber annotations, but they work fine, I might just use them from now on...
It is actually a minor bug that I am not sure I should open a new issue for it. Should I?

Screencast.From.2024-11-19.21-15-35.mp4
Code for reprex
# Running`workbench.action.positronConsole.executeCode` via `Ctrl+Enter`
(x <- 0)

# normal comments are skipped
(x <- x+1)

#* plumber annotations as well 
(x <- x+1)

#' This is a roxygen annotation (or a comment)
#' These are nice for longer comments (auto new line, highlights, etc)
(x <- x+1)

##  If the roxygen annotation is not the first comment in a given area,
#' it works fine as well... 
#' This is a roxygen annotation (or a comment)
#' These are nice for longer comments (auto new line, highlights, etc)
(x <- x+1)
Positron Version / Info
Positron Version: 2024.12.0 build 41
Code - OSS Version: 1.93.0
Commit: 39536c265d6828a68291984d0d359170316d055e
Date: 2024-11-18T02:42:16.243Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Linux x64 6.11.9-amd64

Originally posted by @avila in #5367

@juliasilge juliasilge added enhancement New feature or request lang: r support labels Nov 20, 2024
@juliasilge juliasilge added this to the Future milestone Nov 20, 2024
@juliasilge
Copy link
Contributor Author

If you get used to the way our statement range provider acts with regular comments, then roxygen comments other than #' @examples feel a bit weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lang: r support
Projects
None yet
Development

No branches or pull requests

1 participant