I have a syntax language that uses the XML add-on as the primary language, and then uses control sequences to enable embedding of blocks of the DotNetSyntaxLanguage. Think of it as being similar to ASP.NET, but with XML instead of HTML.
I want to provide a grey background for all of the .NET code blocks, similar to what Visual Studio does. Unfortunately, I can't seem to override the background color for the DotNetSyntaxLanguage lexer. So I implemented a classification tagger (via CodeDocumentTaggerProvider) to detect the start/end control sequence delimiters for the .NET code blocks, and then apply a highlight style to every token in between. This works great for single-line code blocks. However, multi-line code blocks aren't highlighted, because the GetTags override of TaggerBase<ClassificationTag> is only ever being called with single line snapshotRanges.
What is the best way to move forward? I see three options:
1) Can you tell me how to override the background color of all .NET lanage tokens without using a tagger?
2) Can you tell me how to get the GetTags method to supply multi-line ranges?
3) Should I instead look for a start/end delimiter on any range, and then look forward/backward outside of the supplied snapshotRange to construct a TagSnapshotRange that might be larger than the supplied snapshotRange?
Or is there another, better way to do it?
Thanks,
-Scott