Feature request: Let user customize indentation settings

Check out the issue for enabling prettier for some of the thinking here behind the scenes - the gist is, well:

  • The current literal-tabs-and-then-inferred-spaces behavior is, pardon my french, bad, and we’re going to replace it ASAP with expandtab style behavior that at least doesn’t leave you with a mix of tabs and spaces, a style with almost no representation in the JS world.
  • My favored long-term solution is to enable prettier, with fixed defaults - the prettier defaults. There are a few delicious layers to this opinion, one of them being that we hope many Observable users are just entering programming, and we hope that the future of programming is free of stylistic battles. There’s also an emerging consensus around these defaults - 2 space, semicolon-required.

And, sure - this is a super opinionated topic amongst seasoned programmers, but I don’t think we should only care about seasoned programmers, and we should also expect them to change over time. I certainly did, after tinkering with other languages and seeing the simplicity of auto-formatting as the only kind.

2 Likes