refactor highlighting hack to be generic

This commit is contained in:
Matt Parker
2025-10-17 18:18:48 +10:00
parent dd3678d50c
commit ebc77f596e
2 changed files with 36 additions and 26 deletions

View File

@@ -458,7 +458,7 @@ public static class RoslynAnalysis
var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken);
var root = await syntaxTree!.GetRootAsync(cancellationToken);
var classifiedSpans = await ClassifierHelper.GetClassifiedSpansAsync(document, root.FullSpan, ClassificationOptions.Default, false, cancellationToken);
var classifiedSpans = await Classifier.GetClassifiedSpansAsync(document, root.FullSpan, cancellationToken);
var result = classifiedSpans.Select(s => (syntaxTree.GetMappedLineSpan(s.TextSpan), s)).ToList();
return result;
}