Skip to content

Object definition before constructor confuses highlighting functionality #418

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
jnsn opened this issue May 4, 2016 · 3 comments
Closed

Comments

@jnsn
Copy link

jnsn commented May 4, 2016

I am using vim-javascript and vim-jsx to support ReactJS highlighting in Vim, but I'm suffering from some code highlight issues when defining objects before the constructor call. Then it looses the highlighting functionality.

Given the following code:

import React, { Component, PropTypes } from 'react';

export defaults class User extends Component {
  static propTypes = {
    user: PropTypes.object.isRequired
  };

  constructor (props) {
    super (props);
  }

  doSomething () {
  }
}

When the propTypes object is defined, the highlighting gets confused, as illustrated on the following image:

jsx-issue

Did I configure something wrong, or is it an unsupported construct, or am I missing some other configuration?

@amadeus
Copy link
Collaborator

amadeus commented May 4, 2016

So technically this is an ES7 definition, using = sign. Similar to #393

@jnsn
Copy link
Author

jnsn commented May 5, 2016

I thought so.

You can close this as a duplicate then.

@bounceme
Copy link
Collaborator

bounceme commented May 8, 2016

going to close this for now at least

@bounceme bounceme closed this as completed May 8, 2016
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

3 participants