-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add Decorator syntax #8
Comments
+1 |
Also seeing this ... |
pleeeeeeease |
Btw the file in question (for VSCode) needed to modify is here:
it's not overly cryptic, but I'll try to modify this file and restart TS maybe if it's not that hard to achieve I'll post my change here. |
@Ciantic, if you haven't fixed the problem yet, can you please paste your code here? |
@anubmat I haven't found a fix yet, but colors sure are changing: I added the @ sign to the arithmetic-operation, see that @ is now same color as + sign above.
I just threw @ in the end for testing purposes. |
I'm having a problem to find a code where it fails. I think I had it somewhere but if my connect example is working as expected I can't use it to test against. Do you @anubmat have some code which produces the error? Can you paste it as code and not a screenshot. |
Thanks, but I meant can you paste your typescript code "as code" so that I can repro the error you are facing. |
@anubmat that is the thing, I can't reproduce the error right now. I thought I had a error when I saw this big block of white produced by this:
and I had @ sign before connect there, so I thought it was the reason, but above code probably works as expected and is mostly just white cause for other reasons. I did however encounter bug with coloring and decorator sign somewhere, not sure where, so that is why I was asking for a code to reproduce too. |
Yep, object literals and arrow functions are monochrome for now. See #115. |
Note, there's a high-level grammar for ES6 Decorators here: https://github.com/wycats/javascript-decorators/blob/master/README.md |
d0d1952 should handle this. |
Ported from microsoft/TypeScript-Sublime-Plugin#377
Hi,
I want to use decorators, but they mess up the syntax coloring.
Could support for decorators be added? Even if it is only to avoid messing up the rest of the code?
Currently, the decorators look odd, but when a parameter decorator is combined with a pair:
method(@AdapterParam() {req, res}: AdapterData)
, the syntax is lost.I wish I could send a pull request, but I can't seem to understand how the tmLanguage system works.
A patch for me locally would also be awesome (in case you don't want support for experimental features).
Thanks a lot!
The text was updated successfully, but these errors were encountered: