mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for override of attribute indentation

saponifi3d opened this issue · comments

It'd be nice if you could set the attribute indentation separately from the main attribute indentation.

I've found having the attribute be spaced 2 instead of 4 helps readability of what's an attribute, however this plugin enforces them to be equal.

For example:

<Component
    attr1="/default-path"
    attr2="legoland"
    attr3={action('onClick')}
>
    <AnotherComponent />
</Component>

vs

<Component
  attr1="/default-path"
  attr2="legoland"
  attr3={action('onClick')}
>
    <AnotherComponent />
</Component>

This is a wontfix because this logic is dictated by the XML indentation shipped with vim.