tamzinblake / js3-mode

A chimeric fork of js2-mode and js-mode
GNU General Public License v3.0
181 stars 13 forks source link

lazy-commas does not line up var statements #53

Closed tamzinblake closed 12 years ago

tamzinblake commented 12 years ago

Via @deedubs

if I turn on js3-lazy-commas t I get

var a = b
, c = d
, e = f;

instead of

var a = b
  , c = d
  , e = f;
deedubs commented 12 years ago

This seems to have solved it! Found something else. I'll make an new issue and you can see if you agree its a bug.

tillre commented 12 years ago

It only partially works for me. The case:

var a = b()
, c = d();

does not indent correctly. It looks like parens are breaking it.

var a = {foo: "bar"}
, b = 10;

and

var a = [1, 2, 3]
, b = 42;

also dont indent correctly.

tamzinblake commented 12 years ago

@skoni fixed - see #55