mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
Add deindentation rule for 'rescue' statement
This commit is contained in:
parent
21c083f47c
commit
0fe71ebada
@ -206,13 +206,15 @@ define-command -hidden crystal-indent-on-char %{
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:else|elsif)$ <ret> <a-semicolon> <a-?> ^\h*(?:if) <ret> <a-S> 1<a-&> }
|
||||
# align 'when' to 'case'
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:when)$ <ret> <a-semicolon> <a-?> ^\h*(?:case) <ret> <a-S> 1<a-&> }
|
||||
# align 'rescue' to 'begin/def'
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:rescue)$ <ret> <a-semicolon> <a-?> ^\h*(?:begin|def) <ret> <a-S> 1<a-&> }
|
||||
}
|
||||
}
|
||||
|
||||
define-command -hidden crystal-fetch-keywords %{
|
||||
set-register dquote %sh{
|
||||
curl --location https://github.com/crystal-lang/crystal/raw/master/src/compiler/crystal/syntax/lexer.cr |
|
||||
kak -f '%1scheck_ident_or_keyword\(:(\w+\??), \w+\)<ret>y%<a-R>a<ret><esc><a-_>a<del><esc>|sort<ret>'
|
||||
kak -f '%1scheck_ident_or_keyword\(:(\w+\??), \w+\)<ret>y%<a-R>a<ret><esc><a-_>a<del><esc>|sort<ret>'
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user