NiklasPor / prettier-plugin-go-template

Fixes prettier formatting for go templates 🐹

Home Page:prettier-plugin-go-template-niklaspor.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to outdent else/elsifs?

rmzg opened this issue · comments

commented

Right now the formatter indents else/else if blocks one level deeper than their containing if, which is so confusing I assumed it was a bug, but I see in #9 that it was deliberate, which is frankly even more confusing. Is there actually any other language with a standard format where you indent the else statement to a different level its associated if block?

In any case, is it possible to get an option or a flag so if and else blocks are indented to the same level?

Hello @rmzg you're right this one is a bug. #9 was just about other formatting bugs, not about this one.

There is already an issue tracking this behaviour: #23

Kind regards
Niklas