-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Richer R syntax definition by R-Box #28982
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
Conversation
| "version": "0.1.0", | ||
| "publisher": "vscode", | ||
| "engines": { "vscode": "*" }, | ||
| "scripts": { |
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.
Please keep the script and point it to the repo that has the improved grammar.
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.
This syntax based on https://github.com/randy3k/R-Box/blob/master/syntax/R%20Extended.sublime-syntax and that is using sublime-syntax instead of tmbundle. I think "update-grammar" not support this.
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.
It returned.
| "grammars": [{ | ||
| "language": "r", | ||
| "scopeName": "source.r", | ||
| "path": "./syntaxes/r.tmLanguage.json" |
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.
Please keep using the .tmLanguage.json file extension. It makes it easier for us to distinguish the various JSON files.
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.
Ok, fixed.
|
@Ikuyadeu How did you convert it? Manually, or is there a script? We can add that to our 'update-grammar' script |
|
@aeschli First convert by script |
|
@aeschli Thank you for your review, I fixed. |
|
Did you had a chance to look at a script? |
|
@aeschli I just used this script var inputfile = 'R.sublime-syntax',
outputfile = 'r.json',
yaml = require('yamljs'),
fs = require('fs'),
obj = yaml.load(inputfile);
fs.writeFileSync(outputfile, JSON.stringify(obj, null, 2));And fixed manually. I think better way is importing converted json from here by update-grammar. |
|
Thanks for the pointers. |
|
Thank you share your think, actually copy sublime syntax is difficult. "update-grammar": "node ../../build/npm/update-grammar.js textmate/vscode-r syntax/r.json ./syntaxes/r.tmLanguage.json"or "update-grammar": "node ../../build/npm/update-grammar.js lee-dohm/language-r grammars/r.cson ./syntaxes/r.tmLanguage.json" |
|
I'm happy to switch to a better grammar. Important for us would be that
https://github.com/lee-dohm/language-r also is no longer maintained. But if it's the best option out there, I can switch to it. Or are you are interested in hosting and maintaining the grammar? If so, set up a repo! |
|
@aeschli Yes, I'll maintain my repository until better repository is created(e.g. RTVS team will create official extension). |
|
@Ikuyadeu Great. What's the URL of the repo? |
|
@aeschli Here is my repo's syntax file https://github.com/Ikuyadeu/vscode-R/blob/master/syntax/r.json. |
|
Thanks @Ikuyadeu. It would be nice to have a separate repo just for the grammar, to signal that also other products can use it. |
|
@aeschli Thank you. |
|
@aeschli Could you put about 012d7da that improved R grammer to the https://github.com/Microsoft/vscode-docs/blob/vnext/release-notes/v1_17.md#languages? |
|
@aeschli Thank you for your prompt work! |
This syntax in my REditorSupport/vscode-R#10 based on https://github.com/randy3k/R-Box.
But I think this syntax file should in this project.
Improve
before


after
but making new test is not yet, so i'll update test_r.json as soon as possible if need.