-
Notifications
You must be signed in to change notification settings - Fork 52
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
ES6 Syntax Coloration inside JSDT Editor #310
Comments
@piotrtomiak @vrubezhny @dgolovin I have explained how to highlight JSDT Tern Editor with acorn at https://github.com/angelozerr/tern.java/tree/master/sandbox |
@angelozerr FYI we've improved syntax coloring for Luna and Mars in the recent release of Webclipse within a new feature - JSjet - we're using acorn for this. It also ships with a modified version of Tern.java. Would you mind if I update the list of "Who is using" ? P.S. JSjet is the main reason I was quiet recently on github ;) |
Nice! You mean that you are using acorn direcly instead of using a tern plugin. If it that, I think it's a good idea. My fear is for large JS files. JSDT 2.0.0 uses now esprima with Nashorm and for big files, it's very slow. They will study Google closure which seems to be fast. I have too in my side studied how to support syntax coloration for my TypeScript Editor which is based on JSDT. Today I'm using JSDT token scanner, but I would like really support JSX syntax coloration. SO I have studied how VSCode have done that and it uses TextMate grammar. So I have ported quickly vscode-textmate projet written in TypeScript in Java inside https://github.com/angelozerr/textmate.java It starts working but it can be slow (5sec) for large file. If you are interested with this project, I will be glad to collaborate together.
Why?
yes sure with pleasure!
I understand, glad to have your news! |
Let's see. Our current approach turns out to be really neat. With tsserver.js file our code performs really good and we will add more improvements to make it even faster.
We've wanted to merge Tern seamlessly with JSDT and most of the changes are around preference pages reordering and include path. |
That's very strange, JSDT 2.0.0 is very slow with esprima + Nashorm with tsserver.js. But perhaps you have optimized acorn walk (like tern-tjmode) to just return few JSON stream.and perhaps you execute acorn with J2V8? What do you think about https://github.com/angelozerr/textmate.java? Could you be interested?
Ok you mean tern script path. Thanks for your feedback? |
Not immediately. We are focusing on plain JavaScript for now. I hope to be able to get to TypeScript soon. |
This issue is about using https://github.com/katspaugh/tj-mode to highlight with tern/acorn ES6 code (syntax coloration for ES6 template, let, import, export, etc).
To highlight ES6 code inside JSDT Editor:
The text was updated successfully, but these errors were encountered: