fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Blade indentation seems to fail after function application in array #1265

Closed xtvk closed 10 months ago

xtvk commented 1 year ago

When I edit blade, the code below is indented correctly by web-mode:

<!-- foo.blade.php -->

@include('a', [
    'key1' => 'value1',
    'key2' => 'value2',
])

But when I change the 'value1' into someFunc('value1'), in other words, when I write:

@include('a', [
    'key1' => someFunc('value1'), // ← changed
    'key2' => 'value2',
])

web-mode indents the code as follows:

@include('a', [
    'key1' => someFunc('value1'),
'key2' => 'value2', // ← misindented
])

I would love to see a fix for this.


By the way, thank you for your great plugin. This has been making my life drastically easier.

fxbois commented 10 months ago

solved with last commit