Once I start editing my code and adding for loops or if then statements my code indentation is whacked because the previous code maintains its former indentation instead of
You can try my extension Swimat https://github.com/Jintin/Swimat
It support format on selection.
Simple install by brew cask install swimat
brew cask install swimat