From 94ab56d123c07b0318583ac10d45706a1729e58f Mon Sep 17 00:00:00 2001 From: John Isom Date: Tue, 28 Jul 2020 14:18:09 -0600 Subject: [PATCH] Fix indentation rule for php.kak --- rc/filetype/php.kak | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc/filetype/php.kak b/rc/filetype/php.kak index e296b4fa..6ecd8728 100644 --- a/rc/filetype/php.kak +++ b/rc/filetype/php.kak @@ -23,7 +23,7 @@ hook -group php-highlight global WinSetOption filetype=php %{ hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/php-file } } -provide-module php %( +provide-module php %§ require-module html # Highlighters @@ -93,7 +93,9 @@ define-command -hidden php-indent-on-new-line %< try %_ execute-keys -draft k ^\h*[[{]|[[{]$ j _ # append " * " on lines starting a multiline /** or /* comment try %{ execute-keys -draft k s ^\h*/[*][* ]? j gi i * } + # deindent closer token(s) when after cursor + try %_ execute-keys -draft ^\h*[})]+\h*$ hm 1 _ > > -) +§