This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
Add @props directive to the default supported directives #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
@props
directive tosyntax/blade.vim
test.blade.php
Other Notes
I added the
@props
directive to the top of thetest.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.