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

package::function() autocompletion doesn't include re-exported functions #590

Closed
francisbarton opened this issue Jan 4, 2023 · 2 comments · Fixed by #591
Closed

package::function() autocompletion doesn't include re-exported functions #590

francisbarton opened this issue Jan 4, 2023 · 2 comments · Fixed by #591

Comments

@francisbarton
Copy link

In RStudio, I can use autocomplete to complete function names such as:

purrr::set_names() and rvest::read_html().

These are functions that belong originally to other packages (rlang and xml2 respectively in these examples) but are also exported from purrr and rvest.

In R in VSCode, if I try to autocomplete rvest:: I don't get read_html() as a dropdown option. I can only get it by starting with xml2::. Is there a way that languageserver could read in these borrowed functions as options for autocomplete?

@randy3k
Copy link
Member

randy3k commented Jan 5, 2023

Looks like objects doesn't return the re-exported functions.

r$> "set_names" %in% objects(asNamespace("purrr"))
[1] FALSE

r$> "set_names" %in% getNamespaceExports(asNamespace("purrr"))
[1] TRUE

@francisbarton
Copy link
Author

That's awesomely responsive 😲✨

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

Successfully merging a pull request may close this issue.

3 participants