From 194cb17aaec2f3bdd68d2e0a2525249309a39038 Mon Sep 17 00:00:00 2001 From: John Isom Date: Sun, 26 Jul 2020 20:04:18 -0600 Subject: [PATCH] Fix indentation rule for rust.kak --- rc/filetype/rust.kak | 2 ++ 1 file changed, 2 insertions(+) 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