Skip to content

Quoted string as object key not supported #477

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

Closed
alexlafroscia opened this issue Jun 14, 2016 · 10 comments
Closed

Quoted string as object key not supported #477

alexlafroscia opened this issue Jun 14, 2016 · 10 comments
Assignees

Comments

@alexlafroscia
Copy link

alexlafroscia commented Jun 14, 2016

Since pulling the updates from today, my highlighting has been way off.

screen shot 2016-06-14 at 10 37 39 am

None of the consts are highlighted anymore, as are... Well, most other things. It was all fine before develop was merged in today.


Edit: It's been determined that the issue is specifically with the following kind of syntax

const obj = {
  'my-method'() {
    return ...;
  }
};
@amadeus
Copy link
Collaborator

amadeus commented Jun 14, 2016

This is probably the result of your color scheme. We've added a lot more syntax granularity, but it's possible your color scheme isn't matching up to these links well.

Can you link me to your color scheme file and I can look into perhaps better link things up?

@alexlafroscia
Copy link
Author

Hmm, interesting. I'm using gruvbox.

@alexlafroscia
Copy link
Author

alexlafroscia commented Jun 14, 2016

Huh, it looks like it might just be that one file, not a universal problem. Here's a different file, same Vim config

screen shot 2016-06-14 at 10 59 12 am

Things look pretty normal there, so maybe it's just a problem with the first file I showed. Could it be that the red mark on that line that starts with add-to-cart is throwing everything after it off?

@amadeus
Copy link
Collaborator

amadeus commented Jun 14, 2016

Ahah, I think I can see the issue in your first file. It's a type of ES6/7 syntax I never thought to support.

var obj = {
    'key-name'() {}
};

For now, if you changed it to:

var obj = {
    ['some-key']() {}
}

Then it should fix itself. I will work on supporting that string key into parentheses syntax shortly though.

@alexlafroscia
Copy link
Author

Alright, cool. It's not something I can change in my codebase, but I'm glad to know it'll be handled sometime soon.

@alexlafroscia alexlafroscia changed the title Colors way off since last update Quoted string as object key not supported Jun 14, 2016
@amadeus amadeus self-assigned this Jun 14, 2016
@amadeus
Copy link
Collaborator

amadeus commented Jun 14, 2016

I have a fix for this that is going into develop shortly. Thanks for the heads up!

@alexlafroscia
Copy link
Author

alexlafroscia commented Jun 14, 2016

Awesome! Thanks for the quick turn-around there, I'll install from develop and check it out.

Edit: Just installed it, that fixed my problems!

@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

Awesome, closing this, as this fix will be going out shortly.

@amadeus amadeus closed this as completed Jun 16, 2016
@alexlafroscia
Copy link
Author

Thanks again for the quick turn-around!

@amadeus
Copy link
Collaborator

amadeus commented Jun 16, 2016

This is fixed in develop, gonna close this as it should be going into master 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

Successfully merging a pull request may close this issue.

2 participants