Added wip markdown code lazy-loading hook

This commit is contained in:
Justin Frank 2019-05-24 09:41:05 -07:00
parent 9ffde03ca7
commit 1adc5f080b

View File

@ -16,6 +16,11 @@ hook global WinSetOption filetype=markdown %{
hook window InsertChar \n -group markdown-indent markdown-indent-on-new-line
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 %{