othree / yajs.vim

YAJS.vim: Yet Another JavaScript Syntax for Vim
http://www.vim.org/scripts/script.php?script_id=4974
Vim License
688 stars 41 forks source link

static method highlighted in red #36

Closed sunjay closed 9 years ago

sunjay commented 9 years ago

I don't believe my syntax here is wrong, but it is highlighted red. Is there any way to configure this or fix it?

Static methods: http://odetocode.com/blogs/scott/archive/2015/02/02/static-members-in-es6.aspx

screenshot from 2015-05-14 11 51 00

othree commented 9 years ago

I think there should not have () after Test

sunjay commented 9 years ago

@othree My mistake. I found the real problem. The red highlight appears when I use the "." in the extends.

screenshot from 2015-05-15 11 32 45

screenshot from 2015-05-15 11 34 02

othree commented 9 years ago

I am not sure is dot valid there. I will take a look.

2015-05-15 23:34 GMT+08:00 Sunjay Varma notifications@github.com:

@othree https://github.com/othree My mistake. I found the real problem. The red highlight appears when I use the "." in the extends.

[image: screenshot from 2015-05-15 11 32 45] https://cloud.githubusercontent.com/assets/530939/7656084/37efdaee-faf6-11e4-96c4-1917f7aad8c8.png

[image: screenshot from 2015-05-15 11 34 02] https://cloud.githubusercontent.com/assets/530939/7656105/4f24dfe8-faf6-11e4-9712-97dec63cb8ff.png

— Reply to this email directly or view it on GitHub https://github.com/othree/yajs.vim/issues/36#issuecomment-102433776.

OOO

sunjay commented 9 years ago

It should be valid. BabelJS understands it and it's pretty standard JavaScript syntax. I'm just accessing the OtherTest object in the test module.

sunjay commented 9 years ago

Also, even if that is invalid, test.OtherTest should be highlighted, not static.

sunjay commented 9 years ago

Did this get fixed?

othree commented 9 years ago

Yes, this fixed. but the title of this issue is not match so I didn't link it.

My reference is ecmascript draft. And base on that. Not only . is acceptable. All left hand side expression are ok to put there.

sunjay commented 9 years ago

Cool! I'm using vundle. How can I update so I get that fix?

Thanks for fixing it!

othree commented 9 years ago

I think bundle install! can update all plugins. Or you can just go .vim/bundle/yajs.vim and git pull

2015-05-16 10:46 GMT+08:00 Sunjay Varma notifications@github.com:

Cool! I'm using vundle. How can I update so I get that fix?

Thanks for fixing it!

— Reply to this email directly or view it on GitHub https://github.com/othree/yajs.vim/issues/36#issuecomment-102566302.

OOO

sunjay commented 9 years ago

Perfect! It works! Thank you!

Had to run :PluginUpdate