Merge remote-tracking branch 'laelath/markdown-lazy-load'
This commit is contained in:
commit
65327da4cf
|
@ -1,3 +1,4 @@
|
||||||
|
# Detection
|
||||||
hook global BufCreate .*\.(cc|cpp|cxx|C|hh|hpp|hxx|H)$ %{
|
hook global BufCreate .*\.(cc|cpp|cxx|C|hh|hpp|hxx|H)$ %{
|
||||||
set-option buffer filetype cpp
|
set-option buffer filetype cpp
|
||||||
}
|
}
|
||||||
|
@ -444,3 +445,8 @@ define-command objc-alternative-file -docstring "Jump to the alternate objc file
|
||||||
}
|
}
|
||||||
|
|
||||||
§
|
§
|
||||||
|
|
||||||
|
# Module aliases
|
||||||
|
provide-module c %{ require-module c-family }
|
||||||
|
provide-module cpp %{ require-module c-family }
|
||||||
|
provide-module objc %{ require-module c-family }
|
||||||
|
|
|
@ -130,3 +130,7 @@ add-highlighter shared/typescript/code/ regex \b(array|boolean|date|number|objec
|
||||||
add-highlighter shared/typescript/code/ regex \b(as|constructor|declare|enum|from|implements|interface|module|namespace|package|private|protected|public|readonly|static|type)\b 0:keyword
|
add-highlighter shared/typescript/code/ regex \b(as|constructor|declare|enum|from|implements|interface|module|namespace|package|private|protected|public|readonly|static|type)\b 0:keyword
|
||||||
|
|
||||||
§
|
§
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
# ‾‾‾‾‾‾‾
|
||||||
|
provide-module typescript %{ require-module javascript }
|
||||||
|
|
|
@ -18,6 +18,12 @@ hook global WinSetOption filetype=markdown %{
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window markdown-.+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hook -group markdown-load-languages global WinSetOption filetype=markdown %{
|
||||||
|
hook -group markdown-load-languages window NormalIdle .* markdown-load-languages
|
||||||
|
hook -group markdown-load-languages window InsertIdle .* markdown-load-languages
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
hook -group markdown-highlight global WinSetOption filetype=markdown %{
|
||||||
add-highlighter window/markdown ref markdown
|
add-highlighter window/markdown ref markdown
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/markdown }
|
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/markdown }
|
||||||
|
@ -89,4 +95,11 @@ define-command -hidden markdown-indent-on-new-line %{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define-command -hidden markdown-load-languages %{
|
||||||
|
evaluate-commands -draft %{ try %{
|
||||||
|
execute-keys 'gtGbGls```\h*\K[^\s]+<ret>'
|
||||||
|
evaluate-commands -itersel %{ require-module %val{selection} }
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user