-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Re-rewrite babel-sublime #293
Comments
@zertosh Waiting for any progress in this. Do you plan to continue developing or I should switch to atom for regular updates? |
Maybe, #301 also should be added to list? |
I imported VSCode's tmLanguage files and they work perfectly now. Download the syntax from here and convert them from JSON to PList using PackageDev. |
@AriaMinaei, how did you connect it to ST3? I converted that JSON into Plist, also downloaded tmLanguage file. I put them into |
@faiwer It's working for me, did you rename the file extension from |
@caesarsol, thank you! All right, now. |
@caesarsol @faiwer, the issues you're going to run into by using an unmodified TS grammar are (1) Jump to definition and symbols are going to be very incomplete because Sublime depends entirely on the grammar scopes to determine this - VSCode doesn't, so their grammar isn't built for that, (2) some JS-only constructs like labels do not always work correctly |
@zertosh Actually I'm using the JS grammar from VSCode. I'd have to say that it's not absolutely 'perfect', but it works in more cases than babel-sublime last time that I checked. I'd still love to switch back to babel-sublime once the issues are fixed, of course. |
Unfortunately VSCode grammar-syntax has a lot of problems too :( I'm starting to think about using WebStorm. |
Have you considered forking javascript-ultimate and adding JSX?
Are there any other features that |
Also we can add jsx support to native sublime javascript syntax and forget about babel syntax sublimehq/Packages#860 |
@AriaMinaei, got vscode syntax and converted it with PackageDev and works (wanted it for Flow syntax), but the SublimeLinter errors stop showing, I see the errors in the console but they're not highlighted. |
@andreidcm The "syntax_map" config for SublimeLinter should fix that. |
@AriaMinaei, Thx, the lint errors that I see in the console are from ESLint Formatter not SublimeLinter. "syntax_map": {
...
"JavaScript (VSCode)": "javascript",
...
} Double checked the name inside |
@AriaMinaei, Pff, just read the SublimeLinter Docs.
Changed to Thx :) Finaly, Flow syntax support |
@zertosh What's the status? Do you need help with this? |
@Diokuz Add a semicolon after type definition
|
@max-mykhailenko That works but it breaks if you run flow together with prettier and run Edit: I turned on |
It might be time to tell folks this project is no longer actively developed. If there were any progress being made it seems like this issue would be the one to follow, and no one has even commented in the past 9 months. |
I'm happy user of https://github.com/borela/naomi now |
Interesting, I'll check it out. I'm currently trying https://github.com/Thom1729/Sublime-JS-Custom. |
I'm closing this issue in favor of #379. |
This issue tracks all of the TODOS, issues and progress of rewriting the grammar.
The
tmLanguage
format has a lot of limitations (e.g. a single regex can't match across lines, no backtracking, etc) - a "perfect" grammar for flow-typed JS is impossible. "Perfect" means (1) every token has a correct hierarchy of scopes (or none as appropriate) and (2) non-standard formatting doesn't interfere (e.g. comments in weird placesclass /*cmt*/ Bar {}
) – all the while not doing too many expensive regex look-arounds.Some things can't be supported at all, like scoping arrow functions params when the opening
(
is not on the same line as the=>
. Others can be supported if you forgo certain scope hierarchy correctness. I'm willing to make this trade-off since the benefit is usually better theme syntax highlighting at the expense of correct (aka expected) "expand selection to scope". Another trade-off is the extent to which something is included in Symbols (for "Goto definition" and "Goto Symbols"). These are some examples of what should be included: (1) anyclass
orclass
method, (2) named functions, (3) short-methods on objects. Others like object keys that have functions will not be included. I'll do my best to document these behaviors.Goals
tmLanguage
format (notsublime-syntax
) so it can be reused in Atom and VSCode.sublime-syntax
to Atom (Additional support for sublime-syntax grammar atom/first-mate#50).TODO
The text was updated successfully, but these errors were encountered: