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

Fix issues with c() in function args #751

Merged
merged 2 commits into from
Aug 15, 2021

Conversation

ElianHugh
Copy link
Collaborator

Uses the match pattern for functions from the textmate R grammar in place of the previous function pattern. I don't have experience with using textmate grammar, but from testing on my code I haven't seen any issues thus far. If anyone is more knowledgeable with textmate and would like to chime in, that would be greatly appreciated :)

The grammar's repo indicates that there shouldn't be any licensing issues either.

What problem did you solve?

Fixes #713 and incidentally #120.

How can I check this pull request?

The following should not have issues with text decoration when using the PR.

# issue 713
fun <- function(a, c = c("a", "()"), d) {
    function body, not a quoted string
}

# issue 120
f <- function(a=c("a", "b", "c")) {}

Uses the match pattern for functions from the textmate R grammar
@ElianHugh ElianHugh linked an issue Aug 13, 2021 that may be closed by this pull request
Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely! Thanks!

@eitsupi
Copy link
Contributor

eitsupi commented Aug 13, 2021

As I wrote in the comment #713 (comment), do you need to remove the link to the R-Box which is already archived?
Anyone who comes to this repository looking at the vscode source code can be confused.

@ElianHugh
Copy link
Collaborator Author

Thanks for the reminder! I've removed the statement, as modifications to the syntax should be made here anyway

@renkun-ken renkun-ken merged commit c6a9803 into REditorSupport:master Aug 15, 2021
ElianHugh added a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
* Fixes REditorSupport#713

Uses the match pattern for functions from the textmate R grammar

* Remove old rbox message
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.

Syntax highlighting fails when there's a vector argument R tokenizing glitch with c() in function args
3 participants