Forge
csharpdeeb25a2
1using Microsoft.CodeAnalysis.Text;
2
3namespace CascadeIDE.Features.Editor.Application.Monaco;
4
5public static class MonacoEditorHighlightMapper
6{
7 public static IReadOnlyList<CideEditorDecoration> ToDecorations(IReadOnlyList<TextSpan> spans)
8 {
9 if (spans.Count == 0)
10 return Array.Empty<CideEditorDecoration>();
11
12 var list = new List<CideEditorDecoration>(spans.Count);
13 foreach (var span in spans)
14 list.Add(new CideEditorDecoration(span.Start, span.Length, "reference-highlight", null));
15
16 return list;
17 }
18}
19
20
View only · write via MCP/CIDE