-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add more R language config #1479
Conversation
Turns out you can contribute more stuff (like |
@@ -179,6 +179,9 @@ | |||
"R", | |||
"r" | |||
], | |||
"filenames": [ | |||
"NAMESPACE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two directions we can go with NAMESPACE
, either treat it like R syntax or treat it like a separate language. I vote for treating it like R syntax, like Hadley says here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this. The vscode-R extension did implement their own, so in case we ever decide to revisit this, here's their PR with a little bit of discussion:
I'd say the justification for creating a NAMESPACE language configuation is pretty weak and it's reasonable to piggyback off of R.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I opened a NAMESPACE file and an .Rd
file and the syntax highlighting looks good and is a nice improvement ✅
@@ -179,6 +179,9 @@ | |||
"R", | |||
"r" | |||
], | |||
"filenames": [ | |||
"NAMESPACE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this. The vscode-R extension did implement their own, so in case we ever decide to revisit this, here's their PR with a little bit of discussion:
I'd say the justification for creating a NAMESPACE language configuation is pretty weak and it's reasonable to piggyback off of R.
@@ -0,0 +1,114 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file coming from vscode-R? This is just a curiosity / provenance question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with what vscode-R does but made a few changes, based on my opinions 😆 and what RStudio does. (The vscode-R extension is very into UNDERLINING.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, this is a very interesting folder to know about!
https://github.com/rstudio/rstudio/tree/main/src/gwt/acesupport/acemode
Addresses #125
This PR will include the language highlighting config for
NAMESPACE
and.Rd
files. Anrenv.lock
is a JSON file so we should be able to inherit that highlighting somehow.