$ 0 0 You should be able to get the style at a specific position in the document. Check how I do it for custom lexers in the WPF branch.