Added wip markdown code lazy-loading hook
This commit is contained in:
parent
9ffde03ca7
commit
1adc5f080b
|
@ -16,6 +16,11 @@ hook global WinSetOption filetype=markdown %{
|
||||||
|
|
||||||
hook window InsertChar \n -group markdown-indent markdown-indent-on-new-line
|
hook window InsertChar \n -group markdown-indent markdown-indent-on-new-line
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||||
|
|
||||||
|
hook -group markdown-load buffer NormalIdle .* %{ try %{ evaluate-commands -draft %{
|
||||||
|
execute-keys '%s^\h*```\h*\K[^\n]+$<ret>'
|
||||||
|
evaluate-commands -itersel %{ require-module %val{selection} }
|
||||||
|
}}}
|
||||||
}
|
}
|
||||||
|
|
||||||
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user