1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 15:23:29 +03:00

Fix indentation rule for javascript.kak

This commit is contained in:
John Isom 2020-07-27 20:39:44 -06:00
parent cd53d31384
commit 2044f250ae

View File

@ -62,6 +62,8 @@ define-command -hidden javascript-indent-on-new-line %<
try %{ execute-keys -draft k : javascript-trim-indent <ret> }
# indent after lines beginning / ending with opener token
try %_ execute-keys -draft k <a-x> <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
# deindent closing token(s) when after cursor
try %_ execute-keys -draft <a-x> <a-k>^\h*[}\]]+\h*$<ret> hm <a-S> 1<a-&> _
>
>