diff --git a/rc/filetype/rust.kak b/rc/filetype/rust.kak index 24d36f88..55fd2c2b 100644 --- a/rc/filetype/rust.kak +++ b/rc/filetype/rust.kak @@ -112,6 +112,8 @@ define-command -hidden rust-indent-on-new-line %~ try %+ execute-keys -draft k ^\h*where\h*$ j + # dedent after lines starting with . and ending with , or ; try %_ execute-keys -draft k ^\h*\..*[,]\h*$ j _ + # deindent closing brace(s) + try %< execute-keys -draft ^\h*[})]+\h*$ > # todo dedent additional unmatched parenthesis # try %& execute-keys -draft k s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{ # count previous selections length