vim-patch:5867d1f: runtime(svelte): include svelte syntax script and syntax tests (#41796)

closes: vim/vim#21200

5867d1f8ee

Co-authored-by: 231tr0n <zeltronsrikar@gmail.com>
This commit is contained in:
zeertzjq
2026-09-09 08:34:53 +08:00
committed by GitHub
parent 338ce77f34
commit b7f9aceadd
5 changed files with 144 additions and 9 deletions

View File

@@ -142,6 +142,13 @@ let b:current_syntax = "javascript"
if main_syntax == 'javascript'
unlet main_syntax
endif
" Svelte 5 runes ($state, $derived, $props, ...) inside .svelte.js modules.
if expand('%:t') =~# '\.svelte\.js$'
syntax match svelteRune "\$\w\+" containedin=ALL
highlight default link svelteRune Statement
endif
let &cpo = s:cpo_save
unlet s:cpo_save