1

After I've concluded a block with method chaining, VSCode keeps the indentation until I format on save.

Example:

$orders = Order::paid()
    ->notShipped()
    ->get();

    dd($orders); // <-- This line should not be indented to match the method chaining

This is how it's supposed to look (and it does when I format on save, but VSCode shouldn't indent in the first place:

$orders = Order::paid()
    ->notShipped()
    ->get();

dd($orders); // <-- Much better :)

It works when I save because I run Laravel Pint when saving.

1
  • It seems like a bug in the formatter. Raise an issue on their GitHub page. Commented Oct 6, 2024 at 13:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.