Add very basic svelte support
This commit is contained in:
parent
90043e7df0
commit
bbdcc5fdec
22
rc/filetype/svelte.kak
Normal file
22
rc/filetype/svelte.kak
Normal 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 "%val{hook_param_capture_1}-trim-indent" html-trim-indent
|
||||
hook window InsertChar '>' -group "%val{hook_param_capture_1}-indent" html-indent-on-greater-than
|
||||
hook window InsertChar \n -group "%val{hook_param_capture_1}-indent" html-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption "filetype=.*" "
|
||||
remove-hooks window ""%val{hook_param_capture_1}-.+""
|
||||
"
|
||||
}
|
||||
|
||||
hook -group svelte-highlight global WinSetOption filetype=(svelte) %{
|
||||
add-highlighter "window/%val{hook_param_capture_1}" ref html
|
||||
hook -once -always window WinSetOption "filetype=.*" "
|
||||
remove-highlighter ""window/%val{hook_param_capture_1}""
|
||||
"
|
||||
}
|
Loading…
Reference in New Issue
Block a user