REditorSupport / REditorSupport/languageserver
"glue" function semantic for the expressions inside {}
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 675
- Forks
- 118
- Avg merge
- 1d 37m
- Merged PRs (30d)
- 11
Description
The R package glue helps R developer to print data in a formatted manner, in a similarity to python formatted strings(i.e. f"..." in python).
Example usage:
glue("x = {x}", x=42);# prints "x = 42"
As you can see that by the naive highlighter like the one of GitHub(i.e. semantic-free highlighter), the variable inside "{x}" isn't treated as an R expression.
Sadly, this happens also in R language server as well.
It would be nice if R language server will treat the glue function as an exceptional function, and treat what appears in "{}" as R expression.
Not only it will help on highlighting, but also for other utility of language server(go to def, find reference, rename, auto-complete, ...).
Right now, I prefer to use paste()/paste0() instead of glue(), only because R language server (and the R linter BTW, not related to here) ignores the expression meaning.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how the R language server parses expressions and supports semantic highlighting, go-to-definition, references, rename, and completion. Investigate how the glue function’s contents inside braces are represented, then define the expected behavior for those utilities and validate it with focused language-server tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100