mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-18 08:51:46 +03:00
Merge remote-tracking branch 'eraserhd/lisp-indentwidth'
This commit is contained in:
commit
6da4761065
@ -179,8 +179,9 @@ define-command -hidden clojure-indent-on-new-line %{
|
||||
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
||||
|
||||
try %{
|
||||
# If a special form, indent another space
|
||||
execute-keys -draft '"wze<a-k>\A' %opt{clojure_special_indent_forms} '\z<ret><a-L>s.\K.*<ret><a-;>;"i<a-Z><gt>'
|
||||
# If a special form, indent another (indentwidth - 1) spaces
|
||||
execute-keys -draft '"wze<a-k>\A' %opt{clojure_special_indent_forms} '\z<ret>'
|
||||
execute-keys -draft '"wze<a-L>s.{' %sh{printf $(( kak_opt_indentwidth - 1 ))} '}\K.*<ret><a-;>;"i<a-Z><gt>'
|
||||
} catch %{
|
||||
# If not special and parameter appears on line 1, indent to parameter
|
||||
execute-keys -draft '"wze<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
||||
|
@ -43,10 +43,14 @@ define-command -hidden lisp-indent-on-new-line %{
|
||||
try %{
|
||||
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
||||
|
||||
try %{ execute-keys -draft '"wz<a-l>s.\K.*<ret><a-;>;"i<a-Z><gt>' }
|
||||
|
||||
# If not "special" form and parameter appears on line 1, indent to parameter
|
||||
execute-keys -draft '"wze<a-K>\A' %opt{lisp_special_indent_forms} '\z<ret>' '<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
||||
try %{
|
||||
# If a special form, indent another (indentwidth - 1) spaces
|
||||
execute-keys -draft '"wze<a-k>\A' %opt{lisp_special_indent_forms} '\z<ret>'
|
||||
execute-keys -draft '"wze<a-L>s.{' %sh{printf $(( kak_opt_indentwidth - 1 ))} '}\K.*<ret><a-;>;"i<a-Z><gt>'
|
||||
} catch %{
|
||||
# If not "special" form and parameter appears on line 1, indent to parameter
|
||||
execute-keys -draft '"wze<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
||||
}
|
||||
}
|
||||
try %{ execute-keys -draft '[rl"i<a-Z><gt>' }
|
||||
try %{ execute-keys -draft '[Bl"i<a-Z><gt>' }
|
||||
|
Loading…
Reference in New Issue
Block a user