I'd like to create a new extension that allows some kind of text templating similar to Microsoft's T4 runtime text templating engine.
Those templates can contain C# code and I'd like to have LSP functionality for these snippets within the Visual Studio text editor, i.e. renaming, go to definition, hover tips etc.
Is there a way to use/connect to the existing C# language server in such a way that I can send the C# code snippets to it for processing?
How does the Razor engine in ASP.net do it?