indent more like official code
dengcqw opened this issue · 2 comments
dengcqw commented
set cinoptions=j1,J1,(2,m1
natebosch commented
We already use j1,J1
dart-vim-plugin/indent/dart.vim
Line 7 in 940adde
Definitely agree with adding m1.
I don't think we want (2 - from the samples I'm testing we get results closer to dartfmt with (2s,u2s,U1. The first (2s is technically the default but we may as well include it for clarity.
While I'm looking at this we probably also want +2s for statement continuations.
Note that you'll want let g:dart_style_guide = v:true for the best effect since it sets shiftwidth for you.
natebosch commented
Ah, so one thing that makes this interesting, if you're using a trailing comma in an argument list then the (2,or (s, does behave closer to dartfmt...