scala recognition and highlighting