mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
6.97k stars 332 forks source link

feature request: have a flag to ignore indents #1035

Closed TimB87 closed 9 months ago

TimB87 commented 9 months ago

Hi! Would it be feasible for shfmt to have a switch that will ignore indenting?

mvdan commented 9 months ago

Sorry, but I don't think that makes sense - if you're not interested in formatting, then I'm not sure what is the point of a formatter. If there is an issue with how shfmt indents a script, or there's a particular improvement that could be made, please raise an issue.

TimB87 commented 9 months ago

I guess I have been thinking the wrong way around here.

I am working on different projects which use different indent styles - and I am trying to make conform.nvim use shfmt to adapt that preference style as I don't want to overwrite the projects preferences with my own.

Sorry for the noise and thanks for your quick reply :)