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