Rust not to indent on hash
This commit is contained in:
parent
56e12013c8
commit
bfca07da4d
|
@ -154,7 +154,7 @@ define-command -hidden rust-indent-on-new-line %~
|
|||
try %< execute-keys -draft [c[({],[)}] <ret> <a-k> \A[({][^\n]+\n[^\n]*\n?\z <ret> L i<ret><esc> <gt> <a-S> <a-&> >
|
||||
# indent after non-empty lines not starting with operator and not ending with , or ;
|
||||
# XXX simplify this into a single <a-k> without s
|
||||
try %< execute-keys -draft k <a-x> s [^\h].+ <ret> <a-K> \A[-+*/&|^})<gt><lt>] <ret> <a-K> [,<semicolon>](\h*/[/*].*|)$ <ret> j <a-gt> >
|
||||
try %< execute-keys -draft k <a-x> s [^\h].+ <ret> <a-K> \A[-+*/&|^})<gt><lt>#] <ret> <a-K> [,<semicolon>](\h*/[/*].*|)$ <ret> j <a-gt> >
|
||||
# dedent after lines starting with . and ending with } or ) or , or ;
|
||||
try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[}),<semicolon>]\h*$ <ret> j <a-lt> _
|
||||
# align to opening curly brace or paren when newline is inserted before a single closing
|
||||
|
|
|
@ -24,3 +24,5 @@
|
|||
|
||||
> foo%( )
|
||||
|
||||
#[derive(Debug)]%( )
|
||||
|
||||
|
|
|
@ -37,3 +37,6 @@
|
|||
> foo
|
||||
bar
|
||||
|
||||
#[derive(Debug)]
|
||||
bar
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user