v0.9.0 Release Note & Upgrade Guide
v0.9.0 Release Notes ✨
Laravel Envoy
This update brings full support for Laravel Envoy
New Directives:
Envoy Cores:
@servers
@import
@task
@story
@setup
Hooks
@before
@after
@error
@success
@finished
Notifications
@slack
@discord
@telegram
@microsoftTeams
Shell
injection! 😧🎉
Perhaps the most exciting part of the update is the ability for the parser to correctly recognise and parse shell
!! 🤯
Correct me if I am wrong, but I do not think there is any none-tree-sitter editor or parser out there, that can even remotely achieve this.
Blade is intrinsically a very complex file, having php
, html
, shell
, javascript
, css
... The list goes on, with lots of overlap. That is the main reason that no parser managed to nail it. Below is just a tiny example of how complex it can get in the same example.blade.php
!
As you can see the v0.9.0
correctly picks up everything!
Enhancements 🧹
- closed #39
- This should give you a much cleaner AST when parsing your
blade
files - Especially when parsing complicated
texts
orphp_only texts
Before
After
Upgrade Guide
There has been some major structural refactor to make the grammar future proof, semantic and flexible as it grows with Laravel. As a result there has been a breaking change. I can not promise you to be the last one, but there should be no breakage for a good while!
To Upgrade:
- Download the parser
v0.9.2^
and hook it up to your editor - just change your
injections.scm
to the following - You are good to go! ✅
Please note, as mentioned in the README, the php_only is experimental until merged to
tree-sitter-php
.
((text) @injection.content
(#not-has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language php))
; could be bash or zsh
; or whatever tree-sitter grammar you have.
((text) @injection.content
(#has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language bash))
; 🚧 Available for experimental split_parser see issue #5
;((php_only) @injection.content
; (#set! injection.language php_only))
;((parameter) @injection.content
; (#set! injection.language php_only))