othree / es.next.syntax.vim

ES.Next syntax for Vim
MIT License
125 stars 7 forks source link

not properly indenting when not using semicolons #7

Closed nabn closed 7 years ago

nabn commented 8 years ago

I'm not totally sure if this is the right place to be filing an issue. But here's the problem anyway:

with semicolons:

  componentDidMount = _ => {
    updatePosition(this.refs['SELECT_PEOPLE']);
    updatePosition(this.refs['OPTIONLIST']);
  }

  getOptionList = _ => this.refs['OPTIONLIST'];
  setOption = console.log;

without semicolons:


  componentDidMount = _ => {
    updatePosition(this.refs['SELECT_PEOPLE'])
      updatePosition(this.refs['OPTIONLIST'])
  }

  getOptionList = _ => this.refs['OPTIONLIST']
    setOption = console.log

I'm finding this especially problematic for arrow functions inside class definition. Don't think this is related, but here's another problem:

    renderHeader = (name) => {
      return (
          <View style={styles.header}>
          <Button style={styles.button}>Cancel</Button>
          <Text style={styles.headerText}>Review for {name}</Text>
          <Button style={styles.button}>Submit</Button>
          </View>
          )
    }

The plugins I'm using:

        Plug 'mxw/vim-jsx'
        Plug 'othree/yajs'
        Plug 'othree/javascript-libraries-syntax.vim'
        Plug 'othree/es.next.syntax.vim'
        Plug 'maxmellon/vim-jsx-pretty'
dvdzkwsk commented 7 years ago

Experiencing the same, and seemed to come out of nowhere (I swear this was working at some point, though maybe that was just before I added this plugin). Couldn't figure it out for the life of me, but adding semicolons "fixed" the issue. Unfortunately vim plugins are very foreign to me so I can't be of much help in the solution department, but a patch/fix for this would be greatly appreciated.

Edit: the true culprit appears to be yajs -- disabling that plugin fixed the issue.

nabn commented 7 years ago

looks like it's because I enabled xml syntax folding. Didn't see that it was in the readme. Closing.