summaryrefslogtreecommitdiffstats
path: root/syntax/svelte.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2022-04-18 12:08:27 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2022-04-18 12:08:27 +0200
commitdb7bb8ba22f5798bf3abe9f786bc6e6d002725f8 (patch)
treec9d2fd8bead22a93f2c0eb0bd8abe14efe32f509 /syntax/svelte.vim
parentaae85fe8c2a5878aee89ff8025306f3142962b5f (diff)
downloadvim-polyglot-db7bb8ba22f5798bf3abe9f786bc6e6d002725f8.tar.gz
vim-polyglot-db7bb8ba22f5798bf3abe9f786bc6e6d002725f8.zip
Update
Diffstat (limited to 'syntax/svelte.vim')
-rw-r--r--syntax/svelte.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/syntax/svelte.vim b/syntax/svelte.vim
index f67c8caf..7ff85e4c 100644
--- a/syntax/svelte.vim
+++ b/syntax/svelte.vim
@@ -271,6 +271,15 @@ silent! syntax clear htmlHead
syntax match javaScriptNumber '\v<-?\d+L?>|0[xX][0-9a-fA-F]+>'
\ containedin=@javascriptSvelteScript display
+" TypeScript
+" Fix template string `...` breaking syntax highlighting
+syntax region typescriptTemplate
+ \ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
+ \ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
+ \ containedin=typescriptObjectLiteral
+ \ nextgroup=@typescriptSymbols
+ \ skipwhite skipempty
+
" html5 data-*
syntax match htmlArg '\v<data(-[.a-z0-9]+)+>' containedin=@HTMLSyntax
"}}}