LS: smart indentation

Implementation of smart indentation that uses new syntax trees
Might be ideal to document the `-1` sentinel value for these functions.