diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-06 11:31:38 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-06 11:31:38 +0100 |
commit | 303b3f1b434f26f936c241789c84dca6e2f50df2 (patch) | |
tree | 1507706b422e3ec29c0e5f30bcf14681e04ab374 /indent/rust.vim | |
parent | bf849731731a7da008c891476b878735e8280bdc (diff) | |
download | vim-polyglot-303b3f1b434f26f936c241789c84dca6e2f50df2.tar.gz vim-polyglot-303b3f1b434f26f936c241789c84dca6e2f50df2.zip |
Update all bundles
Diffstat (limited to 'indent/rust.vim')
-rw-r--r-- | indent/rust.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indent/rust.vim b/indent/rust.vim index 3033f063..0a3c3344 100644 --- a/indent/rust.vim +++ b/indent/rust.vim @@ -123,6 +123,13 @@ function GetRustIndent(lnum) let prevlinenum = prevnonblank(prevlinenum - 1) let prevline = s:get_line_trimmed(prevlinenum) endwhile + + " Handle where clauses nicely: subsequent values should line up nicely. + if prevline[len(prevline) - 1] == "," + \ && prevline =~# '^\s*where\s' + return indent(prevlinenum) + 6 + endif + if prevline[len(prevline) - 1] == "," \ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]' \ && prevline !~ '^\s*fn\s' |