Skip to content

Add function to open help for selected text#531

Merged
ManuelHentschel merged 6 commits intoREditorSupport:masterfrom
ManuelHentschel:helpsearch
Jan 25, 2021
Merged

Add function to open help for selected text#531
ManuelHentschel merged 6 commits intoREditorSupport:masterfrom
ManuelHentschel:helpsearch

Conversation

@ManuelHentschel
Copy link
Copy Markdown
Member

@ManuelHentschel ManuelHentschel commented Jan 22, 2021

What problem did you solve?
Fix #528
This PR adds a command r.helpPanel.openForSelection that opens the help page for the currently selected function/topic.
Does not contain any error notifications if no matching help page is found.
Does not contain automatic detection of the correct "token" to be used.
Does not containt automatic detection of the correct package to be used (if not specified by using ::).

How can I check this pull request?
Type e.g. print, base::print, base:::print, select the text and execute the command r.helpPanel.openForSelection.

@renkun-ken
Copy link
Copy Markdown
Member

I did some editing with the following updates:

  1. Use the word at cursor if selection is empty
  2. Add command to r/rmd editor context menu.

I think this PR is good enough for typical use already.

Copy link
Copy Markdown
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ManuelHentschel ManuelHentschel marked this pull request as ready for review January 24, 2021 22:02
@ManuelHentschel
Copy link
Copy Markdown
Member Author

The last two commits add:

  • Error notifications no help page is found/no text selected
  • New regex to use the specified package e.g. in base::print
  • Command in the help tree view

@renkun-ken
Copy link
Copy Markdown
Member

@ManuelHentschel Would you like to resolve the conflicts before merging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add context menu item to show help for word at cursor

2 participants