> On Dec 10, 2019, at 1:43 PM, Siddhesh Rane <[email protected]> wrote: > > The most straightforward way I see to do this is some frequency model of a > predefined set of indentation rules.
You bring up a good point I didn’t think of. If the file has inconsistent indentation, the plugin should just pick one—preferably the most common indentation. But for starters it would be OK if the plugin used the first indentation it found that matched that rule. But bonus points for handling inconsistency. You may want to see how others are doing it. For example, I know there are at least a couple of Brackets plugins that do similar (yeah they’re in javascript, but they should give the gist of it). I doubt anything as complex as ML is necessary. Thanks! Alvin
