@Txote-Lusco ,
Sorry, the EnhancedAnyLexer plugin doesn’t work that way. It cannot take the matching word from a pattern on one line, and highlight that same text even in different circumstances later.
You seem to want more features than UDL alone, or UDL-plus-EnhanceAnyLexer, can give you. At that point, the remaining option is to write a custom lexer for your language: but that’s a complicated task, and we’re not going to do that for you; you will either have to write your own lexer, or hire someone to do it for you. (And no, there’s no “request for hire” section in this forum; if someone is interested, they could private-message you using the chat feature in the forum, but this isn’t a “jobs board”.)
[Also, you originally posted your second message as a separate Topic, but since it was about syntax highlighting in the same UDL, I merged it together, so that people can get the full conversation without having to click links to other discussions.]