diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2016-07-19 10:09:54 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2016-07-19 10:09:54 +0200 |
commit | 11f34624aa32ac72dc65e46ea9badb4b16a0edd1 (patch) | |
tree | 63c50a215fe4a67e4223c19b4b1dbb9747c14ffd /syntax/blade.vim | |
parent | 1422f7a75ce0b382d601238c5979b04473b9021e (diff) | |
download | vim-polyglot-11f34624aa32ac72dc65e46ea9badb4b16a0edd1.tar.gz vim-polyglot-11f34624aa32ac72dc65e46ea9badb4b16a0edd1.zip |
Updatev2.11.3
Diffstat (limited to 'syntax/blade.vim')
-rw-r--r-- | syntax/blade.vim | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/syntax/blade.vim b/syntax/blade.vim index 83b36907..42af5145 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -22,7 +22,7 @@ syn case match syn clear htmlError if has('patch-7.4.1142') - syn iskeyword @,48-57,_,192-255,@-@ + syn iskeyword @,48-57,_,192-255,@-@,: else setlocal iskeyword+=@-@ endif @@ -31,17 +31,29 @@ syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}" syn region bladeEcho matchgroup=bladeDelimiter start="{!!" end="!!}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" contains=bladeTodo containedin=ALLBUT,@bladeExempt keepend -syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @include @each @inject @extends @section @stack @push @unless @yield @parent @hasSection nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt -syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @empty @endforelse @endwhile @endcan @stop @append @endsection @endpush @show containedin=ALLBUT,@bladeExempt +syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @cannot @elsecan @elsecannot @include @includeIf @each @inject @extends @section @stack @push @unless @yield @parent @hasSection @break @continue @unset @lang @choice nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt +syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @empty @endforelse @endwhile @endcan @endcannot @stop @append @endsection @endpush @show @overwrite @verbatim @endverbatim containedin=ALLBUT,@bladeExempt + +if exists('g:blade_custom_directives') + exe "syn keyword bladeKeyword @" . join(g:blade_custom_directives, ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt" +endif +if exists('g:blade_custom_directives_pairs') + exe "syn keyword bladeKeyword @" . join(keys(g:blade_custom_directives_pairs), ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt" + exe "syn keyword bladeKeyword @" . join(values(g:blade_custom_directives_pairs), ' @') . " containedin=ALLBUT,@bladeExempt" +endif + +syn region bladePhpRegion matchgroup=bladeKeyword start="\<@php\>\%(\s*(\)\@!" end="\<@endphp\>" contains=@bladePhp containedin=ALLBUT,@bladeExempt keepend +syn match bladeKeyword "@php\ze\s*(" nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt syn region bladePhpParenBlock matchgroup=bladeDelimiter start="\s*(" end=")" contains=@bladePhp,bladePhpParenBlock skipwhite contained syn cluster bladePhp contains=@phpClTop -syn cluster bladeExempt contains=bladeComment,@htmlTop +syn cluster bladeExempt contains=bladeComment,bladePhpRegion,bladePhpParenBlock,@htmlTop -syn cluster htmlPreproc add=bladeEcho,bladeComment +syn cluster htmlPreproc add=bladeEcho,bladeComment,bladePhpRegion -syn keyword bladeTodo todo fixme xxx contained +syn case ignore +syn keyword bladeTodo todo fixme xxx note contained hi def link bladeDelimiter PreProc hi def link bladeComment Comment |