How does the highlighter know that I'm inside quotes and how can I use it in my plugin?

If highlighter exposes this info, then yes. But I don’t know if it does. Better ask @mawww