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

Highlights keywords as error in an arrow function with two parameters #142

Closed tonykevin closed 7 years ago

tonykevin commented 7 years ago

Similar issues #69, in this case with arrow function. I also use javascript-libraries-syntax.vim and I have configured the libraries(let g:used_javascript_libs = 'chai, d3, flux, react').

import React, { PropTypes } from 'react'
import { languages } from '../config'

function Form ({ handleLanguageChange, language }) {
  return (
    <div>
      <label htmlFor='language'>Language: </label>
      <select id='language' value={language} onChange={handleLanguageChange}>
        { languages.map((language, index) => {
          return <option value={language} key={index}> {language} </option>
        })}
      </select>
    </div>
  )
}

export default Form

Highlights scoped return

javascript-react

tonykevin commented 7 years ago

👍 thank you very much, that's awesome.