T4Language icon indicating copy to clipboard operation
T4Language copied to clipboard

Syntax highlight text part?

Open AndersMad opened this issue 4 years ago • 3 comments

Cool thanks! Would it be possible to highlight the "text" part as C#?

Maybe via/if <#@ output extension=".cs"#> or just always as I spose 99% is generating just that.

AndersMad avatar Nov 22 '21 20:11 AndersMad

What about the C# code in the templates that is part of the template itself (not the output)? Edit, yep it does.

I was looking at https://marketplace.visualstudio.com/items?itemName=DevartSoftware.DevartT4EditorforVisualStudio however for me it does not work because I only use VS2022 on my old laptop because it cant run VS2019 or older anymore.

AraHaan avatar Sep 07 '22 02:09 AraHaan

IMHO, this makes the templates a lot less readable. I wouldn't want to do it without a background color (#2) to separate the template code from the output code.

bricelam avatar Sep 19 '22 17:09 bricelam

Also note: It seems the and keyword does not get highlighted that comes from pattern matching in the c# syntax section itself.

AraHaan avatar Sep 19 '22 19:09 AraHaan