-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
VSCode do not support .sublime-syntax which is more powerful than .tmLanguage #5408
Comments
Similar issue, which may be of some value here once it's fixed: atom/first-mate#50 |
I wrote a syntax that combines reactjs with flow which would be impossible without the extra control |
There are syntax highlighting bugs in ES7/Flow/JSX that a Microsoft employee claims are unsolvable with the current syntax highlighting setup. |
+1 This would be greatly appeciated. There are bugs like these: joshpeng/Sublime-Babel-VSCode#24, and a few flowtype cases which I don't see being fixed by the tmlanguage approach for now. Is there some work being done on the highlighter internally @mjbvz? Just discovered a new parser which seems to be better: https://github.com/tree-sitter/tree-sitter |
Tree-sitter sounds very promising. Here is a talk from the recent fosdem: https://youtu.be/0CGzC_iss-8 It is currently used in Atom as an experimental feature. |
Thanks for the video link - that was very informative! |
For an explanation of
|
👍 One of the things that make me "yuck" now that I'm trying to move from Sublime to VSCode is exactly how highlighters are weak, e.g.: Sublime's package "Sass" which comes with scss and sass When trying to discover how convert a So I can't add enough how supporting something already established is the way to go instead of going to implement a new tree-sitter (#50140 && #585) which doesn't look like it's happening as per the time already open. But then again, this one also is old, seems MS doesn't care :( |
+1 |
1 similar comment
+1 |
@jeff-hykin, @DrSensor; bringing this over here from the off-topic at #50140:
Non-deterministic parsing kind of changes that. Thom had interactions with the Tree Sitter creator about capabilities that became a little cranky on one side. Syntect does not appear to be finished with the Jeff, I'd be interested in reading your article when you're done. |
Thank you for calling me out on this! I was unaware of I'm glad you're interested in the article! I'll try to remember to @ you somewhere once I post it. I'm especially excited by these sublime automaton features because the they will be trivial to add to the library that @matter123 and I have been working on. Not only that, but since we implemented it in a real language (Ruby) abstraction tools can be created to make the API much more practical and user friendly. The branch point will be much more difficult to add, however the library already uses a very BNF-looking style of writing so its possible that once branch points are implemented, it could be easy (maybe even automatic) to have old syntaxes utilize branch points. Here's an example pattern for matching grammar[:include] = Pattern.new(
# std_space allows for spaces or inline comments
start_of_line.then(std_space).then(
Pattern.new(
match: /#/,
tag_as: "punctuation.definition.directive"
).maybe(spaces).then(
match: /include/.or(/include_next/),
).then(word_boundary)
).maybe(spaces).then(
# include_partial is a pattern for matching <>, "", and some other common possibilities
include_partial
),
) My first criticism was that, yes that's impressive that it is a deterministic pushdown automaton, but technically BrainF**k is Turing complete haha, although I wouldn't want to write a parser using it either. But again, this is much alleviated by a library that can start doing abstractions on top of the raw features. |
Closing in favor of #216 |
would it be possible to support it in the future?I think .sublime-syntax is more easy to write and readable.
The text was updated successfully, but these errors were encountered: