LS: smart indentation

Implementation of smart indentation that uses new syntax trees
defensive check