Nowadays I tend to delegate the formatting of code to external tools like https://prettier.io/. It’s a no-brainer solution and let me share the same rules with my coworkers on other IDEs. It reformats the whole buffer, but I don’t remember being in a situation where I’m only interested in indenting specific selections.
What are your common use-cases to format only parts of a buffer?
Yes, I agree, at the end of the day, I am also using external formatting tools. This script is just a quick way of indenting a few lines, so that your code would look a little bit more readable.
Also reruning some formators, all the time, can be time consuming, espesially on a big files/projects.