Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

editor:auto-indent mis-indents constructor initializer list #65

Open
turnidge opened this issue Jul 15, 2015 · 1 comment
Open

editor:auto-indent mis-indents constructor initializer list #65

turnidge opened this issue Jul 15, 2015 · 1 comment

Comments

@turnidge
Copy link

In the following program:

class Foo {
  var _bar;

  Foo(var fjkldsjflkdjfkldsjfdlsjfkldsjlkfjdslkfjdsjfdsjfkdjfjdlfjdsklfjdklfff)
  : _bar = 7;
}

If I invoke editor:auto-indent on the ": _bar = 7;" line, the indentation doesn't change. I would prefer to have it double-indented (+4 spaces) like dartfmt does.

@asgerf
Copy link

asgerf commented Jan 23, 2016

Related issue: if the initializer list is manually indented, the constructor body following the initializer list becomes indented too much.

class Foo {
  var _bar;
  Foo(var arg)
      : _bar = 7 {
        print(arg); // indentation should be 4 less
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants