As R# is not supporting the Roslyn Early Preview C# 6.0 features, the code looks very dull...
I would like to colorize the code using a classifier VSIX. Is it possible to get the semantic model from the Roslyn Language Service for the current document?
SLaks
You need to add a reference to Microsoft.CodeAnalysis.EditorFeatures.Text.dll, then use the following code.
var doc = point.Snapshot.GetOpenDocumentInCurrentContextWithChanges();
var model = await doc.GetSemanticModelAsync();
This requires the Microsoft.CodeAnalysis.EditorFeatures.Text
NuGet package (.NET 4.6 required)
来源:https://stackoverflow.com/questions/23869722/get-semantic-model-from-a-classifier-vsix