diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-10-16 14:56:00 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-10-16 14:56:00 +0200 |
commit | 199846c6d87c9ea60eb5f9f8f68e2d9ea4f02b2a (patch) | |
tree | 43a35af46ea780decdd9146601eef6af561cb14c /syntax/svelte.vim | |
parent | f95026252c5a31242903a98c741887696dfbb11f (diff) | |
download | vim-polyglot-199846c6d87c9ea60eb5f9f8f68e2d9ea4f02b2a.tar.gz vim-polyglot-199846c6d87c9ea60eb5f9f8f68e2d9ea4f02b2a.zip |
Update
Diffstat (limited to 'syntax/svelte.vim')
-rw-r--r-- | syntax/svelte.vim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/syntax/svelte.vim b/syntax/svelte.vim index 373d8ac5..e4b5f27d 100644 --- a/syntax/svelte.vim +++ b/syntax/svelte.vim @@ -8,8 +8,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 " URL: https://github.com/evanleck/vim-svelte " " Like vim-jsx, this depends on the pangloss/vim-javascript syntax package (and -" is tested against it exclusively). If you're using vim-polyglot (like I am), -" then you're all set. +" is tested against it exclusively). If you're using vim-polyglot, then you're +" all set. if exists("b:current_syntax") finish @@ -26,13 +26,14 @@ syntax match htmlTagName contained "\<[a-zA-Z:\.]*\>" " "bind:something", etc. syntax match svelteKeyword "\<[a-z]\+:[a-zA-Z|]\+=" contained containedin=htmlTag +" Mixed-case attributes are likely props. +syntax match svelteKeyword "\<[a-z]\+:[a-zA-Z|]\+=" contained containedin=htmlTag + " The "slot" attribute has special meaning. syntax keyword svelteKeyword slot contained containedin=htmlTag " According to vim-jsx, you can let jsBlock take care of ending the region. " https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim -" -" ALLBUT,htmlSpecialTagName keeps Vim from marking CSS regions as jsBlock. syntax region svelteExpression start="{" end="" contains=jsBlock,javascriptBlock containedin=htmlString,htmlTag,htmlArg,htmlValue,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlHead,htmlTitle,htmlBoldItalicUnderline,htmlUnderlineBold,htmlUnderlineItalicBold,htmlUnderlineBoldItalic,htmlItalicUnderline,htmlItalicBold,htmlItalicBoldUnderline,htmlItalicUnderlineBold,htmlLink,htmlLeadingSpace,htmlBold,htmlBoldUnderline,htmlBoldItalic,htmlBoldUnderlineItalic,htmlUnderline,htmlUnderlineItalic,htmlItalic,htmlStrike,javaScript " Block conditionals. |