I use php-mode in Emacs, it work fine execept when I use closures as argument like this:
$app->get('/', function() use ($app) {
echo "foo";
});
It seams that when function is inside function invocation the indentation is doubled. How to fix this?
EDIT
How to make it look like this (the same as javascript-mode handle anonymous functions).
$app->get('/', function() use ($app) {
echo "foo";
});
If you put point at the end of the first line and press C-c C-o, you can see what syntactic construct cc-mode thinks you're in the middle of, and customize how it indents that construct. I don't have php-mode on my current computer, but I think setting this to zero worked reasonably well back when I was doing PHP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With