mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.
1.59k stars 95 forks source link

Allow for override of attribute indentation #145

Closed saponifi3d closed 7 years ago

saponifi3d commented 7 years ago

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>
mxw commented 7 years ago

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