display icons in completions

This commit is contained in:
Matt Parker
2025-10-27 19:49:08 +10:00
parent 077cceac43
commit 9ce00b97a1
4 changed files with 52 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
using Godot;
using Microsoft.CodeAnalysis;
namespace SharpIDE.Godot.Features.CodeEditor;
public partial class SharpIdeCodeEdit
{
private readonly Texture2D _csharpMethodIcon = ResourceLoader.Load<Texture2D>("uid://b17p18ijhvsep");
private readonly Texture2D _csharpClassIcon = ResourceLoader.Load<Texture2D>("uid://b027uufaewitj");
private Texture2D? GetIconForSymbolKind(SymbolKind? symbolKind)
{
var texture = symbolKind switch
{
SymbolKind.Method => _csharpMethodIcon,
SymbolKind.NamedType => _csharpClassIcon,
//SymbolKind.Local => ,
//SymbolKind.Property => ,
//SymbolKind.Field => ,
_ => null
};
return texture;
}
}