Is Lezer overkill for this use case?

If I wish to trigger autocomplete on certain words after they’re typed would I be better using a regex in update or adding it to the existing lezer grammar and using that to identify when to trigger the autocomplete. I will be using lezer for formatting rules and highlighting but I’m wondering if using it for this case would give better performance?

You generally don’t want to use the parser to identify specific words (except if they have a syntactic rule, like language keywords), but rather let the parser find that there is an identifier/variable there, and then access the document to figure out what its name is.

Thanks for the clarification.