improved detection of right syntax

using the scope instead syntax name makes it possible to extend the syntax file