1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-25 12:36:11 +03:00

Merge remote-tracking branch 'eraserhd/lisp-nested-brackets'

This commit is contained in:
Maxime Coste 2020-01-05 09:55:37 +11:00
commit 7470b22c97
10 changed files with 30 additions and 2 deletions

View File

@ -208,7 +208,7 @@ define-command -hidden clojure-indent-on-new-line %{
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-K>[\s()\[\]\{\}]<ret><a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
execute-keys -draft '"wz<a-K>[()[\]{}]<ret>e<a-K>[\s()\[\]\{\}]<ret><a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
}
}
try %{ execute-keys -draft '[rl"i<a-Z><gt>' }

View File

@ -69,7 +69,7 @@ define-command -hidden lisp-indent-on-new-line %{
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>'
execute-keys -draft '"wz<a-K>[()\[\]{}]<ret>e<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
}
}
try %{ execute-keys -draft '[rl"i<a-Z><gt>' }

View File

@ -0,0 +1 @@
c<ret><esc>

View File

@ -0,0 +1,3 @@
((metafn 42)%( )(y 79))
([weird 42]%( )(y 79))
({map 42}%( )(y 79))

View File

@ -0,0 +1,6 @@
((metafn 42)
(y 79))
([weird 42]
(y 79))
({map 42}
(y 79))

View File

@ -0,0 +1,3 @@
source "%val{runtime}/rc/filetype/lisp.kak"
source "%val{runtime}/rc/filetype/clojure.kak"
set buffer filetype clojure

View File

@ -0,0 +1 @@
c<ret><esc>

View File

@ -0,0 +1,4 @@
(let ((x 42)%( )(y 79)))
(let [(x 42)%( )(y 79)])
(let ([x 42]%( )[y 79]))
(let ({x 42}%( ){y 79}))

View File

@ -0,0 +1,8 @@
(let ((x 42)
(y 79)))
(let [(x 42)
(y 79)])
(let ([x 42]
[y 79]))
(let ({x 42}
{y 79}))

View File

@ -0,0 +1,2 @@
source "%val{runtime}/rc/filetype/lisp.kak"
set buffer filetype lisp