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

"glue" function semantic for the expressions inside {} #633

Open
Tal500 opened this issue Aug 31, 2023 · 0 comments
Open

"glue" function semantic for the expressions inside {} #633

Tal500 opened this issue Aug 31, 2023 · 0 comments

Comments

@Tal500
Copy link

Tal500 commented Aug 31, 2023

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.

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

No branches or pull requests

1 participant