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

Load documents referenced in source() calls #382

Closed
wants to merge 2 commits into from

Conversation

renkun-ken
Copy link
Member

Closes #20

This PR detects top-level source() calls and load documents referenced in such calls.

For example,

sources.R:

source("source1.R")

source1.R:

source("source2.R")

f <- function(x) {
  x + 1
}

source2.R:

g <- function(x) {
  x + 1
}

Opening sources.R will also load source1.R and source2.R.

@renkun-ken renkun-ken marked this pull request as draft February 20, 2021 04:54
@randy3k
Copy link
Member

randy3k commented Feb 21, 2021

Didn't check the code yet. Does it handle

p <- "path"
source(p)

@renkun-ken
Copy link
Member Author

Closing as the design is still problematic.

@renkun-ken renkun-ken closed this Jul 1, 2021
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.

Extend completion with source by recursive parsing
2 participants