DanielGavin / ols

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

Update `.editorconfig` fix accessibility issues #265

Open ttytm opened 10 months ago

ttytm commented 10 months ago

This PR makes some minor fixes as the current setting unfortunately creates some confusion in the editor.

It wants to:

DanielGavin commented 10 months ago

The reason tabs_width exists is not for tabs itself, but when you are breaking lines when they exceed line width. If there is no tab_width it could get quite wonky when someone makes a billion scopes, but we act like the tab is just one space, but on the editor it is 4-8 spaces.

It's one of shortcomings of tabs, formatter is operating in an uncertain environment.

I still prefer having a config to get a compromise between pretending tabs is one space.

Would to hear your opinion on how to manage line breaking when odinfmt uses tabs.

Example:


func :: proc() {

    {
        {
             {
                 {
                     a := 2 //this would in spaces be 28, but 12 with tabs pretending the symbol is one space
                 }

             }
        }

    }

}