DanielGavin / ols

Language server for Odin
MIT License
418 stars 62 forks source link

[Suggestion]odinfmt: move towards more modern indentation setting #266

Open ttytm opened 10 months ago

ttytm commented 10 months ago

Thank for the work that wents into the project @DanielGavin

I want to make a suggestion, that would address the issue first stated here #265

The suggestion is moving towards a more modern setting for indentation that takes either a number or "tab" as value for odinfmt. The beauty with tabs is that one indentation is always one indentation and the width is based on the developers current need and preference. Imposing an additional indent width is an anti-setting that is not necessary when using tabs, it rather creates issues (something that the linked PR is trying to address for the .editorconfig of ols). E.g. stylelint uses the setting mentioned above, indendation=int|"tab" stylelint.io/user-guide/rules/indentation#options

Having something similar for odinfmt would signal users that it's one of the formatters that at least knows it's business.