This package adds syntax definitions for the Laravel Blade engine.

Overview

Laravel Blade Highlighter

This package adds syntax definitions for the Laravel Blade engine.

Works with various Sublime Text version, for older/specific versions use older/specific release.

How to install w/Sublime Package Control

  1. Search for Laravel Blade and install it.
  2. Restart Sublime Text.
  3. Reopen any .blade files.
  4. Enjoy :)

Sublime Text Manual Install

  1. Download or clone this repository into [install-dir]/Packages/laravel-blade
  2. Restart Sublime Text.
  3. Reopen any .blade files.
  4. Enjoy :)

Yeah but, show me what it is?

blade-example

Predawn.

blade-example

Material Theme.

Supported Extensions

How to Contribute

  • To test a local version of the highlighter first uninstall the highlighter from package control.
  • Follow the manual installation process by cloning the repo into your packages directory.
  • Restart Sublime Text.
  • Open up the '[install-dir]/Packages/laravel-blade' folder into a new Sublime Text project.
  • Open up the blade.tmLanguage file and make changes.
  • I have provided a test.blade file that holds most of the common uses for testing the regex, use this to verify your changes before and after you make them to ensure the changes you make do not break anything.
  • Send a pull request with a single change per request.
Comments
  • Error Loading Syntax File error after updating to build 3126

    Error Loading Syntax File error after updating to build 3126

    Here is the error message I get when I try to load any .blade.php file

    Error loading syntax file "Packages/Laravel Blade Highlighter/blade.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit

    Any idea what's going on and how I can fix it?

    opened by Fuitad 58
  • Highlighting breaks on latest Sublime 3

    Highlighting breaks on latest Sublime 3

    Today, I was going to work and my Blade Highlighting broke after getting version 3092 of Sublime Text 3. My color scheme is called IR_Black.

    Why is this is happening?

    opened by heitorsilva 26
  • Blade toggle_comment keystroke broken in ST Build 3103

    Blade toggle_comment keystroke broken in ST Build 3103

    My ST updated to Build 3103 and now my commenting is not working correctly. Instead of using the blade comments, it is wrapping in HTML comments

    {{-- Old comment style --}}
    
    <!-- New comment style -->
    

    unless it is a line with an @include or {{ ... }} directive, in which case it comments like this:

    // {{ trans('page.content') }}
    

    which of course isn't even a comment at all.

    This definitely changed when I upgraded to ST Build 3103.

    opened by jdavidbakr 18
  • commenting inside blade

    commenting inside blade

    thanx for the last update, however now we cant make an html comment as all now is being treated as blade comments only.

    also the blade comment end is not colored mainly because the {{-- have a scope of punctuation.definition.comment.html while the other side --}} doesn't have it.

    opened by ctf0 16
  • Package does not work when installed alongside 'CSS3' package.

    Package does not work when installed alongside 'CSS3' package.

    When both are installed, and a php/blade file is opened, this error occurs:

    Error loading syntax file "Packages/Laravel Blade Highlighter/blade.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit
    

    Using build 3126 of Sublime. Removing either package fixes the issue.

    opened by ryami333 13
  • @stack and @push/@endpush breaks highlighting in Sublime Text 3 Build 3114

    @stack and @push/@endpush breaks highlighting in Sublime Text 3 Build 3114

    Syntax highlighting breaks when using either @stack or @push/@endpush in Sublime Text 3 Build 3114.

    skarmavbild 2016-05-14 kl 10 50 47

    Screenshot from Sublime Text 3 Build 3103 for reference

    skarmavbild 2016-05-14 kl 10 52 41

    opened by haxzorer 12
  • Blade commenting

    Blade commenting

    I don't know if is intended to work like this but for a while now, I can no longer use (Ctrl/CMD) + / to toggle the blade comments.

    Is there anything I can do to fix it? I just have no idea what to modify in order for it to work, I don't want the html comments in my blade files.

    What I want in the end is to be able to comment like this:

    <div class="form-group">
        <label for="category">Category</label>
        <select id="category" class="form-control" name="category" placeholder="Select category">
            <option value="awesome">Awesome</option>
            {{-- <option value="">Select</option> --}}
            {{--
                @foreach( $categorys as $category )
                    <option value="{{ $category->id }}">{{ ucfirst($category->name) }}</option>
                @endforeach
            --}}
        </select>
    </div>
    

    I don't mind manually installing the package.

    Thanks in advance.

    opened by cpriego 12
  • [BUG] Sublime text 2 installation using package control causes the package folder to be called

    [BUG] Sublime text 2 installation using package control causes the package folder to be called "Laravel Blade Highlighter" instead of "laravel-blade"

    Sublime text 2 installation using package control causes the package folder to be called "Laravel Blade Highlighter" instead of "laravel-blade"

    Which causes sublime text 2 to trigger an error every time its launched.

    opened by Xees 12
  • Stopped working today

    Stopped working today

    Uninstalled and try to install again. Got this error in console.

    Package Control: Error downloading package. HTTP error 404 downloading https://codeload.github.com/Medalink/laravel-blade/zip/1.6.18.

    opened by mrlinnth 11
  • Error loading syntax file

    Error loading syntax file

    A couple of days ago the package does not work anymore I get this error message:

    Error loading syntax file 'Packages/Laravel Blade Highlighter/blade.sublime-syntax': Apparent recursion within a with_prototype action: 25000 context sanity limit hit

    opened by 28development 11
  • @if highlighting no longer working correctly

    @if highlighting no longer working correctly

    Hi,

    My blade files are no longer being highlighted correctly. Any @if statements that appear within quotes are not closing correctly and the highlight that is usually used between quotes runs all the way through the rest of the code.

    For example:

    <p class="first-class @if(x==true) second-class @endif">Text</p>

    The above statement will cause string highlighting to continue all the way down the code.

    I think the update 2 days ago (15/08/2017) might have caused this issue.

    I'm not sure if this applies to @for and the other blade control structures.

    Thank you for the package!

    opened by stuartcusackie 11
  • Fix attribute value scopes after directives

    Fix attribute value scopes after directives

    Fixes #196

    This commit adds a fallback pattern to generic-attribute-values context in order to correctly scope attribute values, even if no attribute names have been consumed before.

    The @click directive is not scoped as attribute name due to a design issue of basic HTML syntax with regards to prototype handling within tags. Hence HTML does not match/consume the value assignment via =.

    opened by deathaxe 0
Releases(2.0.0)
Owner
Eric Percifield
Web Artisan and Gamer. I play way too much with code and work way too hard gaming ;)
Eric Percifield
Vim syntax highlighting for Blade templates.

vim-blade Vim syntax highlighting for Blade templates (Laravel 4+). This plugin contributes to vim-polyglot language pack. Installation Using vim-plug

Jason Walton 194 Dec 1, 2022
Blade UI Kit is a set of renderless components to utilise in your Laravel Blade views

Blade UI Kit is a set of renderless components to utilise in your Laravel Blade views. In all essence, it's a collection of useful utilities, connecting the dots between different parts of the TALL stack. It was made for Blade, Laravel's powerful templating engine.

Blade UI Kit 1.2k Jan 5, 2023
Blade Snip allows you to use parts of a blade template multiple times. Basically partials, but inline.

Blade Snip Blade Snip allows you to use parts of a blade template multiple times. Basically partials, but inline: <div class="products"> @snip('pr

Jack Sleight 18 Dec 4, 2022
Use Laravel's Blade templating engine outside of Laravel.

Use Laravel's Blade templating engine outside of Laravel. This package provides a standalone version of Laravel's Blade templating engine for use outs

Ryan Chandler 22 Jan 2, 2023
A Laravel Code Generator based on your Models using Blade Template Engine

Laravel Code Generator is a PHP Laravel Package that uses Blade template engine to generate code for you. The difference between other code generators

Victor Yoalli 59 Dec 5, 2022
A general-purpose parser for Laravel's Blade templating engine.

A general-purpose parser for Laravel's Blade templating engine. This is where your description should go. Try and limit it to a paragraph or two. Cons

Ryan Chandler 6 Feb 18, 2022
Use Laravel's blade engine as a CLI for rendering files.

Blade CLI Use Laravel's blade engine as a CLI for rendering files. Introduction This package customizes and extends several of the Illuminate\View cla

Sergio Compean 31 Oct 21, 2022
Snippets for blade template engine

Blade Snippets for Sublime Text Blade is a simple, yet powerful templating engine provided with Laravel PHP framework. These snippets works with blade

Alex Antonyuk 113 Jan 3, 2023
Blade is a simple, yet powerful templating engine provided for the Slim Framework

slim-blade Blade is the default template engine of Laravel. The main advantage of Blade is template inheritance whilst using plain PHP. This package a

Kevin Darren 32 May 24, 2021
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
Retrieve the EC2 Metadata using Laravel's eloquent syntax.

Laravel EC2 Metadata Retrieve the EC2 Metadata using Laravel's eloquent syntax. ?? Supporting If you are using one or more Renoki Co. open-source pack

Renoki Co. 4 Dec 27, 2021
A package to easily make use of Iconic icons in your Laravel Blade views.

Blade Iconic A package to easily make use of Iconic icons in your Laravel Blade views. For a full list of available icons see the SVG directory. Iconi

Malik Alleyne-Jones 17 Aug 25, 2022
A package to easily make use of Simple Icons in your Laravel Blade views.

Blade Simple Icons A package to easily make use of Simple Icons in your Laravel Blade views. For a full list of available icons see the SVG directory.

UB Labs 12 Jan 17, 2022
A package to easily make use of SVG icons in your Laravel Blade views.

Blade Icons A package to easily make use of SVG icons in your Laravel Blade views. Originally "Blade SVG" by Adam Wathan. Turn... <!-- camera.svg -->

Blade UI Kit 1.7k Jan 2, 2023
A package to easily make use of Iconsax in your Laravel Blade views.

Blade Iconsax A package to easily make use of Iconsax in your Laravel Blade views. This package contains 1.000 icons in 6 diferent styles, a total of

Guilherme Saade 4 Oct 22, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022
This package allows you to render livewire components like a blade component, giving it attributes, slots etc

X-livewire This package allows you to render livewire components like a blade component, giving it attributes, slots etc. Assuming you wanted to creat

null 7 Nov 15, 2022
A package that adds view-composer like feature to Inertia.js Laravel adapter

Kinetic A package that adds view-composer like feature to Inertia.js Laravel adapter. Use to be able to share props based on the Inertia component nam

Marvin Quezon 76 Dec 12, 2022
This Laravel Nova package adds a Trumbowyg field to Nova's arsenal of fields.

Nova Trumbowyg Field This Laravel Nova package adds a Trumbowyg field to Nova's arsenal of fields. Requirements php: >=8.0 laravel/nova: ^4.0 Installa

outl1ne 3 Sep 25, 2022