Instead of directly trying to program with KRL, you could try to use one of the plugins to post process the robot statements into KRL. Check this one: