The SNP leader – as expected – was formally elected to the role by MSPs at the Scottish Parliament on Tuesday.