Skip to content

Introduce auto indent detection

Waqar Ahmed requested to merge work/indent-auto-detect into master

Auto indent detection does what it says i.e., detects the indentation in a file. The code is directly ported from VSCode where this has been a feature since a number of years, as such, the implementation should be fairly stable I think.

The feature itself is very useful as sometimes you are working in a code base which uses tabs and it is different from your default settings and you unknowingly add spaces and only realize later what you have done. If the editor can handle this automatically for you, I think it is very helpful.

I have set it to enabled by default so that more people get to test it, otherwise no one knows we even have this feature. If problematic, we can disable it before the upcoming release. Testing myself on a few files, it gives accurate results so far.

Merge request reports