Merge remote-tracking branch 'JJK96/svelte' into master

This commit is contained in:
Maxime Coste 2020-11-10 19:03:40 +11:00
commit 5d81be40cf

22
rc/filetype/svelte.kak Normal file
View File

@ -0,0 +1,22 @@
hook global WinCreate .*\.svelte %[
set-option window filetype svelte
]
hook global WinSetOption filetype=(svelte) %{
require-module html
hook window ModeChange pop:insert:.* -group "svelte-trim-indent" html-trim-indent
hook window InsertChar '>' -group "svelte-indent" html-indent-on-greater-than
hook window InsertChar \n -group "svelte-indent" html-indent-on-new-line
hook -once -always window WinSetOption "filetype=.*" "
remove-hooks window ""svelte-.+""
"
}
hook -group svelte-highlight global WinSetOption filetype=(svelte) %{
add-highlighter "window/svelte" ref html
hook -once -always window WinSetOption "filetype=.*" "
remove-highlighter ""window/svelte""
"
}