peitalin / vim-jsx-typescript

React JSX syntax highlighting for vim and Typescript
The Unlicense
305 stars 29 forks source link

Indentation Screwed when reindenting #13

Closed danielnehrig closed 4 years ago

danielnehrig commented 5 years ago
const contentPanel = (array: JSX.Element[], dataType: string): JSX.Element | undefined => {
  if (array.length) {
    return (
      <div className='masonry-item col-md-6'>
        <div className='bgc-white p-20 bd'>
          <h6 className='c-grey-900'>{dataType}</h6>
          <ul>
              {array}
          </ul>
      </div>
    </div>
    )
  } else {
    return undefined
  }
}

reindent looks like this : Screenshot 2019-06-17 at 15 54 01

Visual Select all and reindent with = will screw up the ideation (that's caused by {array})

mcabrams commented 5 years ago

Same issue here, curious if anyone has found a solution.

peitalin commented 4 years ago

Should be fixed with last commit mentioned in #4 . Not sure if this is a separate issue.