REditorSupport / REditorSupport/languageserver

Support import package

Open
#521 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
675
Forks
118
Avg merge
1d 37m
Merged PRs (30d)
11

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by reproducing the import::from examples in the R language server and inspect how completion is currently discovered for packages and scripts. Done means completion works for objects imported into a new environment, including both ggplot2 and a local xyz.R script, with tests covering the demonstrated cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.