Hacker News new | ask | show | jobs
by jlokier 2255 days ago
A code formatter knows, so your editor and other tools can also know.

Most editors have code structure parsing of some kind built-in for tabbing already. E.g. pressing the <tab> key indents the current line to match the structure of surrounding code (or cycles between valid indents for something like Haskell or Python). So they know the difference between initial indentation (that people want to be able to configure visually) and alignment.