Skip to content

R: Open help for selection fails for some functions #661

@jolars

Description

@jolars

Describe the bug

r.helpPanel.openForSelection (R: Open help for selection) sometimes fail to work although documentation-on-hovering does.

See the example below where I cannot use the command to open the documentation for glmnet::glmnet(), although the documentation shows when hovering (via the language server), and also opens up correctly when I execute ?glmnet. This also happens for instance with the function bag() from the caret package, so this is not a problem only with functions named exactly as the package. For the built-in function lm() and also for other functions such as ggplo2::geom_point() the command works fine.

help-shortcut-fail

To Reproduce
Steps to reproduce the behavior:

  1. Open an .R file.
  2. Write the name of a function in the file.
  3. Highlight the function name and select R: Open help for selection from the command tool box.
  4. See error

Do you want to fix by self? (We hope your help!)

Yes, I'll take a look at it.

setting.json:

{
    "r.rterm.linux": <path-to-radian>,
    "r.sessionWatcher": true,
    "r.rmarkdown.codeLensCommands": [
        "r.runCurrentChunk",
        "r.runAboveChunks",
        "r.runAllChunks"
    ],
    "r.bracketedPaste": true
}

Expected behavior

I expected the documentation to open up.

Environment (please complete the following information):

  • OS: Linux
  • VSCode Version: 1.56.2
  • R Version: 4.0.5
  • vscode-R version: 1.6.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions