Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust selectors for Sublime Text 4 and refactored Blade syntax #50

Merged
merged 1 commit into from
Jan 3, 2023
Merged
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
12 changes: 5 additions & 7 deletions snippets/blade-acfrepeater.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@acfrepeater (${1:'fieldname'})
${2:{{-- expr --\}\}}
{{ get_sub_field(${1:'fieldname'}) \}\}
${2:{{-- expr --\}\}}
{{ get_sub_field(${1:'fieldname'}) \}\}
@acfend$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>acf</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>acf</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-after.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${0:hip}
@endafter
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>after</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-asset.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
{{ asset('${0:path}') }}
]]></content>
<tabTrigger>asset</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>asset</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-auth.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${3:{{-- expr --\}\}}
@endauth$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>auth</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-break.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@break${1:('${2:condition}')}
]]></content>
<tabTrigger>break</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>break</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 4 additions & 6 deletions snippets/blade-can.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@can('${1:policy}', ${2:Model}::class)
${3:{{-- expr --\}\}}
${3:{{-- expr --\}\}}
@endcan
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>can</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>can</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
12 changes: 5 additions & 7 deletions snippets/blade-can_else.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@can('${1:policy}', \$${2:model})
${3:{{-- expr --\}\}}
${3:{{-- expr --\}\}}
@else
${4:{{-- else expr --\}\}}
${4:{{-- else expr --\}\}}
@endcan$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cane</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>cane</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 4 additions & 6 deletions snippets/blade-canany.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@canany(['${1:policy}', '${2:policy}'], ${3:${4:Model}::class})
${5:{{-- expr --\}\}}
${5:{{-- expr --\}\}}
@endcanany
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>canany</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>canany</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
12 changes: 5 additions & 7 deletions snippets/blade-canany_else.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@canany(['${1:policy}', '${2:policy}'], ${3:${4:Model}::class})
${5:{{-- expr --\}\}}
${5:{{-- expr --\}\}}
@elsecanany(['${6:policy}', '${7:policy}'], ${8:${9:Model}::class})
${10:{{-- else expr --\}\}}
${10:{{-- else expr --\}\}}
@endcanany
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cananye</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>cananye</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 5 additions & 5 deletions snippets/blade-cannot.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@cannot('${1:policy}', ${2:Model}::class)
${3:{{-- expr --\}\}}
${3:{{-- expr --\}\}}
@endcannot
]]></content>
<tabTrigger>cannot</tabTrigger>
<scope>text.blade</scope>
<description>See if user can't perform an action</description>
<tabTrigger>cannot</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
<description>See if user can't perform an action</description>
</snippet>
12 changes: 6 additions & 6 deletions snippets/blade-cannot_else.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@cannot('${1:policy}', \$${2:model})
${3:{{-- expr --\}\}}
${3:{{-- expr --\}\}}
@else
${4:{{-- else expr --\}\}}
${4:{{-- else expr --\}\}}
@endcannot
]]></content>
<tabTrigger>cannote</tabTrigger>
<scope>text.blade</scope>
<description>See if user can't perform an action with else</description>
<tabTrigger>cannote</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
<description>See if user can't perform an action with else</description>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-choice.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@choice('${1:language.line}', ${2:number})
]]></content>
<tabTrigger>choice</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>choice</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-comment.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
{{-- ${0:comment} --}}
]]></content>
<tabTrigger>comment</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>comment</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 5 additions & 5 deletions snippets/blade-component.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@component('${1:component}', '${2:array}')
$3
$3
@endcomponent
]]></content>
<tabTrigger>comp</tabTrigger>
<scope>text.blade</scope>
<description>Defines a component and passes array with data</description>
<tabTrigger>comp</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
<description>Defines a component and passes array with data</description>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-continue.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@continue${1:('${2:condition}')}
]]></content>
<tabTrigger>continue</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>continue</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
8 changes: 3 additions & 5 deletions snippets/blade-csrf.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@csrf
$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>csrf</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>csrf</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
8 changes: 3 additions & 5 deletions snippets/blade-dump.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@dump(${0:expression})
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>dump</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>dump</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-each.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<content><![CDATA[
@each ('${1:item.view}', ${2:\$items}, '${3:item}', '${4:empty.view}')$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>each</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 4 additions & 6 deletions snippets/blade-elseif.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@elseif (${1:condition})
${2:{{-- true expr --\}\}}$0
${2:{{-- true expr --\}\}}$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>eif</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<tabTrigger>eif</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
10 changes: 5 additions & 5 deletions snippets/blade-empty.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@empty ($1)
$2
$2
@endempty
]]></content>
<tabTrigger>empty</tabTrigger>
<scope>text.blade</scope>
<description>Defines an empty statement</description>
<tabTrigger>empty</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
<description>Defines an empty statement</description>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-expr.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<content><![CDATA[
{{ ${0:expression} }}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>}}</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-expr_js.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<content><![CDATA[
@{{ ${1:expression} }}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>@{{</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
6 changes: 3 additions & 3 deletions snippets/blade-extends.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
<content><![CDATA[
@extends('${1:view}')$0
]]></content>
<tabTrigger>ext</tabTrigger>
<scope>text.blade</scope>
<tabTrigger>ext</tabTrigger>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-for.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${6:{{-- expr --\}\}}
@endfor$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>for</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-fore.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
${4:{{-- empty expr --\}\}}
@endforelse$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fore</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-foreach.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${3:{{-- expr --\}\}}
@endforeach$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>foreach</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-guest.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${3:{{-- expr --\}\}}
@endguest$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>guest</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-has_section.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
${3:{{-- false expr --\}\}}
@endif$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hass</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-hipchat.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<content><![CDATA[
@hipchat(['${1:token}', '${2:room}', "${3:$task ran in the $env environment.}")$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hip</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-if.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
${2:{{-- expr --\}\}}
@endif$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>if</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
4 changes: 1 addition & 3 deletions snippets/blade-if_else.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
${3:{{-- false expr --\}\}}
@endif$0
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ife</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.blade</scope>
<scope>(text.blade | text.html.blade | source.css.blade | source.js.blade) - custom.compiler.blade - meta.embedded.blade - source.php - text.plain - punctuation.section.embedded</scope>
</snippet>
Loading