Mercurial > ec-dotfiles
annotate vendor/vim-syntax/blade.vim @ 682:88888f40c628
[vimrc] Disable indent plugin
Less predictable behavior with it enabled.
author | nanaya <me@nanaya.pro> |
---|---|
date | Fri, 24 Jun 2022 22:50:19 +0900 |
parents | 11e00204fb18 |
children |
rev | line source |
---|---|
589 | 1 " Vim syntax file |
2 " Language: Blade (Laravel) | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
3 " Maintainer: Jason Walton <jwalton512@gmail.com> |
589 | 4 " Filenames: *.blade.php |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
5 |
589 | 6 if exists('b:current_syntax') |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
7 finish |
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
8 endif |
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
9 |
589 | 10 if !exists("main_syntax") |
11 let main_syntax = 'blade' | |
12 endif | |
13 | |
14 runtime! syntax/html.vim | |
15 unlet! b:current_syntax | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
16 runtime! syntax/php.vim |
589 | 17 unlet! b:current_syntax |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
18 |
589 | 19 syn case match |
20 syn clear htmlError | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
21 |
589 | 22 if has('patch-7.4.1142') |
595 | 23 syn iskeyword @,48-57,_,192-255,@-@,: |
589 | 24 else |
25 setlocal iskeyword+=@-@ | |
26 endif | |
27 | |
28 syn region bladeEcho matchgroup=bladeDelimiter start="@\@<!{{" end="}}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend | |
29 syn region bladeEcho matchgroup=bladeDelimiter start="{!!" end="!!}" contains=@bladePhp,bladePhpParenBlock containedin=ALLBUT,@bladeExempt keepend | |
30 syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" contains=bladeTodo containedin=ALLBUT,@bladeExempt keepend | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
31 |
595 | 32 syn keyword bladeKeyword @if @elseif @foreach @forelse @for @while @can @cannot @elsecan @elsecannot @include |
33 \ @includeIf @each @inject @extends @section @stack @push @unless @yield @parent @hasSection @break @continue | |
612 | 34 \ @unset @lang @choice @component @slot @prepend @json @isset @auth @guest @switch @case @includeFirst @empty |
625 | 35 \ @includeWhen |
595 | 36 \ nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt |
37 | |
612 | 38 syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @endforelse @endwhile @endcan |
595 | 39 \ @endcannot @stop @append @endsection @endpush @show @overwrite @verbatim @endverbatim @endcomponent |
612 | 40 \ @endslot @endprepend @endisset @endempty @endauth @endguest @endswitch |
595 | 41 \ containedin=ALLBUT,@bladeExempt |
42 | |
43 if exists('g:blade_custom_directives') | |
44 exe "syn keyword bladeKeyword @" . join(g:blade_custom_directives, ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt" | |
45 endif | |
46 if exists('g:blade_custom_directives_pairs') | |
47 exe "syn keyword bladeKeyword @" . join(keys(g:blade_custom_directives_pairs), ' @') . " nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt" | |
48 exe "syn keyword bladeKeyword @" . join(values(g:blade_custom_directives_pairs), ' @') . " containedin=ALLBUT,@bladeExempt" | |
49 endif | |
50 | |
51 syn region bladePhpRegion matchgroup=bladeKeyword start="\<@php\>\s*(\@!" end="\<@endphp\>" contains=@bladePhp containedin=ALLBUT,@bladeExempt keepend | |
52 syn match bladeKeyword "@php\ze\s*(" nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt | |
589 | 53 |
54 syn region bladePhpParenBlock matchgroup=bladeDelimiter start="\s*(" end=")" contains=@bladePhp,bladePhpParenBlock skipwhite contained | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
55 |
589 | 56 syn cluster bladePhp contains=@phpClTop |
595 | 57 syn cluster bladeExempt contains=bladeComment,bladePhpRegion,bladePhpParenBlock,@htmlTop |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
58 |
595 | 59 syn cluster htmlPreproc add=bladeEcho,bladeComment,bladePhpRegion |
589 | 60 |
595 | 61 syn case ignore |
62 syn keyword bladeTodo todo fixme xxx note contained | |
589 | 63 |
64 hi def link bladeDelimiter PreProc | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
65 hi def link bladeComment Comment |
589 | 66 hi def link bladeTodo Todo |
67 hi def link bladeKeyword Statement | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
68 |
589 | 69 let b:current_syntax = 'blade' |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
70 |
589 | 71 if exists('main_syntax') && main_syntax == 'blade' |
72 unlet main_syntax | |
538
f5b6dba3308b
Add syntax highlight for blade (laravel).
edogawaconan <me@myconan.net>
parents:
diff
changeset
|
73 endif |