• LaggyKar@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    How can it tell the difference between spaces used for indentation and spaces used for alignment, if you use the same character for both?

    • lud@lemm.ee
      link
      fedilink
      arrow-up
      8
      ·
      2 years ago

      I guess the indention sizer thing knows how the formater works and adjusts accordingly. I can’t imagine it would be too much of a problem.

      Iirc Jetbrain IDEs has a feature called dynamic tabs/space (or something like that) which uses exclusively tabs until it needs to align something and a tab doesn’t fit, so it uses a few spaces instead.

    • coloredgrayscale@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Maybe alignment more for the righthand side of assignments. If you have a block of variables with different name lengths, or within a constructor / function call.