languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

Support import package

Open toscm opened this issue 3 years ago • 1 comments

Hi everyone, thanks for your amazing work!

Is it possible to somehow get code completion for packages imported through the import package?

In particular I'm interested in packages and/or scripts imported into new environments. Example:

gg <- import::from("ggplot2", .all=T, .into={new.env()}, .character_only=T)
gg$ggplot(data.frame(x=1:10, y=1:10), gg$aes(x, y)) + gg$geom_point()

# Lines below assume there is a file `xyz.R` in your working dir defining `func`
xyz <- import::from("xyz.R", .all=T, .into={new.env()}, .character_only=T)
xyz$func(1:10)

toscm avatar Feb 04 '22 08:02 toscm

Maybe duplicate of #257

eitsupi avatar Feb 09 '22 14:02 eitsupi