Skip to content
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

Open
angelozerr opened this issue Sep 1, 2015 · 6 comments
Open

ES6 Syntax Coloration inside JSDT Editor #310

angelozerr opened this issue Sep 1, 2015 · 6 comments

Comments

@angelozerr
Copy link
Owner

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:

@angelozerr
Copy link
Owner Author

@piotrtomiak @vrubezhny @dgolovin I have explained how to highlight JSDT Tern Editor with acorn at https://github.com/angelozerr/tern.java/tree/master/sandbox

@piotrtomiak
Copy link
Contributor

piotrtomiak commented May 13, 2016

@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 ;)

@angelozerr
Copy link
Owner Author

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.

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.

JSjet - we're using acorn for this. It also ships with a modified version of Tern.java.

Why?

Would you mind if I update the list of "Who is using" ?

yes sure with pleasure!

P.S. JSjet is the main reason I was quiet recently on github ;)

I understand, glad to have your news!

@piotrtomiak
Copy link
Contributor

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.

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.

JSjet - we're using acorn for this. It also ships with a modified version of Tern.java.

Why?

We've wanted to merge Tern seamlessly with JSDT and most of the changes are around preference pages reordering and include path.

@angelozerr
Copy link
Owner Author

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.

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?

We've wanted to merge Tern seamlessly with JSDT and most of the changes are around preference pages reordering and include path.

Ok you mean tern script path. Thanks for your feedback?

@piotrtomiak
Copy link
Contributor

What do you think about https://github.com/angelozerr/textmate.java? Could you be interested?

Not immediately. We are focusing on plain JavaScript for now. I hope to be able to get to TypeScript soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants