attempt to improve syntax highlighting UX?

This commit is contained in:
Matt Parker
2025-10-17 18:04:36 +10:00
parent 85eaec30c7
commit dd3678d50c
4 changed files with 135 additions and 17 deletions

View File

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