Skip to content

Load documents referenced in source() calls - #382

Closed
renkun-ken wants to merge 2 commits into
REditorSupport:masterfrom
renkun-ken:sources
Closed

renkun-ken wants to merge 2 commits into
REditorSupport:masterfrom
renkun-ken:sources

Conversation

@renkun-ken

Copy link
Copy Markdown
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

randy3k commented Feb 21, 2021

Copy link
Copy Markdown
Member

Didn't check the code yet. Does it handle

p <- "path"
source(p)

@renkun-ken

Copy link
Copy Markdown
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