Plugin makes wrong indents in case of "("-brackets
ProgrammingLife opened this issue · 5 comments
I use:
let g:dart_style_guide = 0
In dart file I write: Container(, hit Enter and I get 4 spaces instead of 2 or 0 spaces according to my config.
After {-bracket I get 2 spaces. The problem is only with (-bracket.
If I turn off the Plugin after hitting Enter I get 0 spaces.
In my config I don't have autoindent-options and all according to tabs-options.
How to find out what's the root of the problem?
vim version: VIM - Vi IMproved 8.2 8021897
linux mint
I have the same issue, did you find a solution?
@vyorkin, Unfortunately, no.
yes, I have the same issue.
let g:dart_style_guide = 2
This setting doesn't seem to do anything.
indentation following a ( is 4 spaces by default. This matches dartfmt when you don't use a trailing comma in the argument list.
See also https://github.com/dart-lang/dart-vim-plugin#why-doesnt-the-plugin-indent-identically-to-dartfmt
It looks like the style has been changed, to match what the output of dart format does I've set:
:set cinoptions=j1,J1,(2,U1,m1,+2s
to remove the double shiftwidth for unclosed parenthesis and the further nesting ( and u options.