mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New line indentation within classes

dvcrn opened this issue · comments

commented

Hi! Followed both install instructions for this and pangloss/vim-javascript

Code:
(|| indicates cursor position)

class Foo { ||
  constructor(props) {

  }
}

hitting enter puts the cursor on

class Foo { 
||
  constructor(props) {

  }
}

instead of

class Foo { 
  ||
  constructor(props) {

  }
}

Similar all motions that act on lines like o, dd, cc put the cursor at the beginning of the line instead of the correctly indented position. This only happens when I use let g:jsx_ext_required = 0.

Any advise on how I can debug this?

I can't repro. Could you please read the README and update this issue with the appropriate details?

commented

I figured out what it was. I had vim-polyglot and pangloss/vim-javascript installed at the same time. pangloss/vim-javascript is already in polyglot and that somehow conflicted. Removing either package fixes the indentation issue I had