Update source of R grammar
@Ikuyadeu @randy3k In the R grammar file https://github.com/Ikuyadeu/vscode-R/blob/master/syntax/r.json it says, "This file has been converted from https://github.com/randy3k/R-Box/blob/master/syntax/R%20Extended.sublime-syntax If you want to provide a fix or improvement, please create a pull request against the original repository. Once accepted there, we are happy to receive an update request".
https://github.com/randy3k/R-Box is deprecated in favour of https://github.com/REditorSupport/sublime-ide-r but as far as I can tell that doesn’t contain an R grammar file. Is this the new source of the R grammar? https://github.com/REditorSupport/atom-language-r/blob/master/grammars/r.cson
The R syntax of R-Box/R-IDE has been merged into Sublime Text official repo.
This is my newest PR to the repo: https://github.com/sublimehq/Packages/pull/2250 It is still pending to be merged though.
@randy3k Thank you!
I will update the URL in the grammar file.
Can we solve the grammar inconsistencies such as #144 and something like ns$.__NAMESPACE__.$lazydata where __NAMESPACE__ is falsely considered incorrect?
Hmm, it looks like sublime-syntax is more expressive than TextMate grammar so it may not be possible to automatically convert between them anymore.
@renkun-ken #144 is what I was thinking of. I’m pretty sure I know how to fix it and I’m wondering where the fix should go.
I don’t think sublime-syntax can be automatically converted to a TextMate grammar, and it unfortunately doesn’t sound like there is any movement towards supporting sublime-syntax in VSCode: https://github.com/microsoft/vscode/issues/5408
I propose that we remove the link in https://github.com/Ikuyadeu/vscode-R/blob/master/syntax/r.json and modify it directly when we want to change the highlighting.
If anyone has a better approach please suggest it! If not, I’ll do a PR for this in a week or so.
This looks related to #120, btw.
here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter