diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-10-08 19:00:59 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-10-08 19:00:59 +0200 |
commit | fd74d8b2b170b540680a9bbf6c64990f8ebafd08 (patch) | |
tree | b1fdef6203a78a21053d1b8e0666ab7a38c36df2 /after | |
parent | 055f7710b65dfa2df52fc0b5be2486ae36ac5751 (diff) | |
download | vim-polyglot-3.3.3.tar.gz vim-polyglot-3.3.3.zip |
Updatev3.3.3
Diffstat (limited to 'after')
-rw-r--r-- | after/ftplugin/jsx.vim | 5 | ||||
-rw-r--r-- | after/ftplugin/terraform.vim | 7 | ||||
-rw-r--r-- | after/syntax/jsx.vim | 6 | ||||
-rw-r--r-- | after/syntax/yaml.vim | 7 |
4 files changed, 22 insertions, 3 deletions
diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim index a5682895..380d476b 100644 --- a/after/ftplugin/jsx.vim +++ b/after/ftplugin/jsx.vim @@ -11,8 +11,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsx') == -1 " modified from html.vim if exists("loaded_matchit") let b:match_ignorecase = 0 - let b:match_words = '(:),\[:\],{:},<:>,' . + let s:jsx_match_words = '(:),\[:\],{:},<:>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(/\@<!>\|$\):<\@<=/\1>' + let b:match_words = exists('b:match_words') + \ ? b:match_words . ',' . s:jsx_match_words + \ : s:jsx_match_words endif setlocal suffixesadd+=.jsx diff --git a/after/ftplugin/terraform.vim b/after/ftplugin/terraform.vim index 1328931a..48ae0f20 100644 --- a/after/ftplugin/terraform.vim +++ b/after/ftplugin/terraform.vim @@ -75,4 +75,11 @@ if get(g:, "terraform_align", 1) setlocal shiftwidth=2 endif +" Set the commentstring +if exists('g:terraform_commentstring') + let &l:commentstring=g:terraform_commentstring +else + setlocal commentstring=#%s +endif + endif diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim index 05987149..1785b4b2 100644 --- a/after/syntax/jsx.vim +++ b/after/syntax/jsx.vim @@ -36,6 +36,10 @@ endif " jsBlock take care of ending the region. syn region xmlString contained start=+{+ end=++ contains=jsBlock,javascriptBlock +" JSX comments inside XML tag should color as comment. Note the trivial end pattern; we let +" jsComment take care of ending the region. +syn region xmlString contained start=+//+ end=++ contains=jsComment + " JSX child blocks behave just like JSX attributes, except that (a) they are " syntactically distinct, and (b) they need the syn-extend argument, or else " nested XML end-tag patterns may end the outer jsxRegion. @@ -49,7 +53,7 @@ syn region jsxChild contained start=+{+ end=++ contains=jsBlock,javascriptBlock " and generic Flow type annotations (http://flowtype.org/). syn region jsxRegion \ contains=@Spell,@XMLSyntax,jsxRegion,jsxChild,jsBlock,javascriptBlock - \ start=+\%(<\|\w\)\@<!<\z([a-zA-Z][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+ + \ start=+\%(<\|\w\)\@<!<\z([a-zA-Z_][a-zA-Z0-9:\-.]*\>[:,]\@!\)\([^>]*>(\)\@!+ \ skip=+<!--\_.\{-}-->+ \ end=+</\z1\_\s\{-}>+ \ end=+/>+ diff --git a/after/syntax/yaml.vim b/after/syntax/yaml.vim index 0a4a4af1..489691b5 100644 --- a/after/syntax/yaml.vim +++ b/after/syntax/yaml.vim @@ -21,13 +21,17 @@ if version < 600 endif syntax clear -syn match yamlBlock "[\[\]\{\}\|\>]" +syn match yamlInline "[\[\]\{\}]" +syn match yamlBlock "[>|]\d\?[+-]" syn region yamlComment start="\#" end="$" syn match yamlIndicator "#YAML:\S\+" syn region yamlString start="\(^\|\s\|\[\|\,\|\-\)'" end="'" skip="\\'" syn region yamlString start='"' end='"' skip='\\"' contains=yamlEscape +syn region yamlString matchgroup=yamlBlock start=/[>|]\s*\n\+\z(\s\+\)\S/rs=s+1 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 +syn region yamlString matchgroup=yamlBlock start=/[>|]\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+2 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 +syn region yamlString matchgroup=yamlBlock start=/[>|]\d\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+3 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 syn match yamlEscape +\\[abfnrtv'"\\]+ contained syn match yamlEscape "\\\o\o\=\o\=" contained syn match yamlEscape "\\x\x\+" contained @@ -53,6 +57,7 @@ hi link yamlKey Identifier hi link yamlType Type hi link yamlComment Comment +hi link yamlInline Operator hi link yamlBlock Operator hi link yamlString String hi link yamlEscape Special |