mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-28 09:07:19 +03:00
Fix indentation rule for rust.kak
This commit is contained in:
parent
d2437b468d
commit
194cb17aae
@ -112,6 +112,8 @@ define-command -hidden rust-indent-on-new-line %~
|
|||||||
try %+ execute-keys -draft k <a-x> <a-k> ^\h*where\h*$ <ret> j <a-gt> +
|
try %+ execute-keys -draft k <a-x> <a-k> ^\h*where\h*$ <ret> j <a-gt> +
|
||||||
# dedent after lines starting with . and ending with , or ;
|
# dedent after lines starting with . and ending with , or ;
|
||||||
try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[,<semicolon>]\h*$ <ret> j <a-lt> _
|
try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[,<semicolon>]\h*$ <ret> j <a-lt> _
|
||||||
|
# deindent closing brace(s)
|
||||||
|
try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> >
|
||||||
# todo dedent additional unmatched parenthesis
|
# todo dedent additional unmatched parenthesis
|
||||||
# try %& execute-keys -draft k <a-x> s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{
|
# try %& execute-keys -draft k <a-x> s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{
|
||||||
# count previous selections length
|
# count previous selections length
|
||||||
|
Loading…
Reference in New Issue
Block a user