Add onEnterRules
for regular old comments in R
#6049
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #5974
The order in this JSON file is important; if you put the regular comment rule before the ones for plumber and roxygen, it takes precedence and we lose the special behavior for plumber and roxygen. It has to go after.
We have continuation behavior for Python already here:
positron/extensions/positron-python/src/client/language/languageConfiguration.ts
Lines 25 to 33 in c200f27
It is slightly different than what we've chosen for R; it will continue in the middle of a comment but not at the end. We inherit this behavior from upstream, while the R behavior was chosen to be more like RStudio. It's a little weird that the behavior is different but maybe appropriate, for the two language communities?
Release Notes
New Features
Bug Fixes
QA Notes
The comment continuation for roxygen (
#'
) and plumber (#*
) should continue to work in.R
files in R Quarto cells, and now we will additionally continue regular old comments (#
) in the same spots.