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

[javascript] Bring back ES6 syntax highlighting support #133

Closed
txchen opened this issue Nov 19, 2015 · 10 comments
Closed

[javascript] Bring back ES6 syntax highlighting support #133

txchen opened this issue Nov 19, 2015 · 10 comments
Assignees
Labels
javascript JavaScript support issues
Milestone

Comments

@txchen
Copy link

txchen commented Nov 19, 2015

Right now, those keywords like import class from are all plain white.

@leafduo
Copy link

leafduo commented Nov 19, 2015

And async from ES7 seems to be interpreted to TypeScript keyword.

@jahewson
Copy link

+1. Also => needs to be in a separate syntax class from the operators that are keywords, such as instanceof because I want to color keywords separately from =>. Also for import * as 'foo' import and as need to be keywords while * needs to be either an operator or something else more specific to imports.

@aeschli
Copy link
Contributor

aeschli commented Nov 24, 2015

Our colorizer doesn't support ES6 / ES7 yet. I will look for a text mate grammar that does that.

@aeschli aeschli changed the title Improve ES6 syntax highlighting support [javascript] Improve ES6 syntax highlighting support Nov 24, 2015
@aeschli aeschli changed the title [javascript] Improve ES6 syntax highlighting support [javascript] Add ES6 syntax highlighting support Nov 24, 2015
@jnystrom
Copy link

@aeschli I thought for sure ES6 template strings were handled fairly well in the previous version of VSCode.

@aeschli aeschli changed the title [javascript] Add ES6 syntax highlighting support [javascript] Bring back ES6 syntax highlighting support Nov 24, 2015
@aeschli
Copy link
Contributor

aeschli commented Nov 24, 2015

@jnystrom Yes, it's a regression, we switched from our own tokenizer to a JavaScript text mate grammar.

@egamma
Copy link
Member

egamma commented Nov 30, 2015

Plan is to use the TypeScript provided textmate grammar for JavaScript

@aeschli aeschli added the javascript JavaScript support issues label Nov 30, 2015
@aeschli
Copy link
Contributor

aeschli commented Dec 3, 2015

New grammar based on TypeScript grammar delivered.

@aeschli aeschli closed this as completed Dec 3, 2015
@aeschli
Copy link
Contributor

aeschli commented Dec 3, 2015

To try this out on a November release (0.10.1 - 3), replace the content of
Microsoft VS Code/resources/app/extensions/javascript/syntaxes/JavaScript.tmLanguage
with
https://github.com/Microsoft/vscode/raw/0b3f7b223d86ac1e8bbebc670913ed83595e98c6/extensions/javascript/syntaxes/JavaScript.tmLanguage

@konrad-garus
Copy link

I tried the workaround from @aeschli, restarted Code, but still keywords like yield are not highlighted. This is 0.10.6 on Ubuntu.

@aeschli
Copy link
Contributor

aeschli commented Jan 19, 2016

@konrad-garus yield is still not colored due to bug microsoft/TypeScript-TmLanguage#29

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

8 participants