Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Support @isset and @endisset directives. #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion indent/blade.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let b:did_indent = 1

" Doesn't include 'foreach' and 'forelse' because these already get matched by 'for'.
let s:directives_start = 'if\|else\|unless\|for\|while\|empty\|push\|section\|can\|hasSection\|verbatim\|php\|' .
\ 'component\|slot\|prepend\|auth\|guest'
\ 'component\|slot\|prepend\|auth\|guest\|isset'
let s:directives_end = 'else\|end\|empty\|show\|stop\|append\|overwrite'

if exists('g:blade_custom_directives_pairs')
Expand Down
4 changes: 2 additions & 2 deletions syntax/blade.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ syn region bladeComment matchgroup=bladeDelimiter start="{{--" end="--}}" c
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 @component @slot @prepend @json @isset @auth @guest @switch @case @includeFirst @empty
\ @includeWhen
\ @includeWhen @isset
\ nextgroup=bladePhpParenBlock skipwhite containedin=ALLBUT,@bladeExempt

syn keyword bladeKeyword @else @endif @endunless @endfor @endforeach @endforelse @endwhile @endcan
\ @endcannot @stop @append @endsection @endpush @show @overwrite @verbatim @endverbatim @endcomponent
\ @endslot @endprepend @endisset @endempty @endauth @endguest @endswitch
\ @endslot @endprepend @endisset @endempty @endauth @endguest @endswitch endisset
\ containedin=ALLBUT,@bladeExempt

if exists('g:blade_custom_directives')
Expand Down