jwalton512 / vim-blade

Vim syntax highlighting for Blade templates.
226 stars 37 forks source link

Add @props directive to the default supported directives #75

Open alexandersix opened 2 years ago

alexandersix commented 2 years ago

Overview

This PR resolves #74 by adding the @props directive to the list of default supported directives.

The @props directive was supplied by Laravel as part of their Blade component upgrade (docs here) as a way to pass data into anonymous components. For anyone unfamiliar, anonymous components are Blade components that are not backed by a PHP class and only consist of a Blade file.

Since Laravel has added this directive directly into the framework, I think we ought to have it in this plugin as well!

Additions

Other Notes

I added the @props directive to the top of the test.blade.php file because, typically, that's where the directive would go in everyday use.

I'm fairly certain that I added the directive to the correct spot in the syntax file, as it was working when I tested using the provided blade testing file, but I'm happy to move it somewhere else in the list if that would be preferable.

Thank you again for maintaining this package! It's an integral part to my Laravel development workflow, so I really appreciate it.