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

Add @props directive to the default supported directives#75

Open
alexandersix wants to merge 2 commits intojwalton512:masterfrom
alexandersix:add-props-directive
Open

Add @props directive to the default supported directives#75
alexandersix wants to merge 2 commits intojwalton512:masterfrom
alexandersix:add-props-directive

Conversation

@alexandersix
Copy link
Copy Markdown

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

  • Adds the @props directive to syntax/blade.vim
  • Adds a test to test.blade.php

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add @props directive to the supported directives list

1 participant