Skip to content

Record use of @inheritDotParams to allow more robust autocompletion in RStudio #1808

@orgadish

Description

@orgadish

rstudio/rstudio#17149 implements RStudio autocompletion for params inherited via @inheritDotParams.

Since there is no indication that @inheritDotParams was used, the implementation currently traverses the Rd and looks for the structure defined in

roxygen2/R/rd-inherit.R

Lines 281 to 290 in 93b8778

rd <- paste0(
"\n",
" Arguments passed on to ",
from,
"\n",
" \\describe{\n",
args,
"\n",
" }"
)
.

This makes it very brittle and sensitive to changes in formatting (though workable). It would be great if instead the use of inheritDotParams was recorded more directly.

Per @kevinushey's suggestion on the PR

I could imagine something like a .ROXYGEN2. environment in the package's namespace that stores roxygen2 metadata of this form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions