Skip to content

Commit e0971a0

Browse files
committed
Support Typesript arrow function highlight inside props
1 parent 612b346 commit e0971a0

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

syntax/svelte-html.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ syntax region svelteBlockEnd
7777

7878
syntax keyword svelteBlockKeyword if else each await then catch as
7979

80-
syntax cluster simpleJavascriptExpression contains=\CjavaScript.*
80+
syntax cluster simpleJavascriptExpression
81+
\contains=\CjavaScript.*
82+
silent! syntax cluster simpleJavascriptExpression
83+
\contains=@typescriptExpression,typescriptProp
8184

8285
" Redefine JavaScript syntax
8386
syntax region javaScriptStringS

syntax/svelte.vim

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ endfunction
7777
" syntax. It defines group htmlJavaScript and htmlCss.
7878
call s:LoadSyntax('@HTMLSyntax', 'html')
7979

80-
" Load svelte-html syntax
81-
syntax include syntax/svelte-html.vim
82-
8380
" Avoid overload
8481
if !hlexists('cssTagName')
8582
call s:LoadSyntax('@htmlCss', 'css')
@@ -125,6 +122,14 @@ if s:use_typescript
125122
endif
126123
"}}}
127124

125+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
126+
"
127+
" Load Svelte specific html syntax {{{
128+
"
129+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
130+
syntax include syntax/svelte-html.vim
131+
"}}}
132+
128133
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
129134
"
130135
" Syntax highlight {{{

0 commit comments

Comments
 (0)