madskristensen / RainbowBraces

A Visual Studio extension
Apache License 2.0
133 stars 7 forks source link

D language #114

Closed iz0eyj closed 2 months ago

iz0eyj commented 3 months ago

Visual Studio 2022 Visual D extension

Is there any way to make this work with D? The syntax is almost identical to C, so I don't understand what the problem is.

Thanks, Federico

lordfanger commented 3 months ago

You can try it yourself. Fork the repo and edit file src\Tagger\RainbowTaggerProvider.cs. Simply add ContentType that will work with your D files. I don't have your extension, so I can't try it myself.

/* ... */
[Export(typeof(IViewTaggerProvider))]
[ContentType(ContentTypes.CPlusPlus)]
[ContentType(ContentTypes.CSharp)]
[ContentType(ContentTypes.VisualBasic)]
[ContentType(ContentTypes.FSharp)]
[ContentType(ContentTypes.Css)]
[ContentType(ContentTypes.Less)]
[ContentType(ContentTypes.Scss)]
[ContentType(ContentTypes.Json)]
[ContentType(ContentTypes.Xaml)]
[ContentType(ContentTypes.Xml)]
[ContentType(ContentTypes.WebForms)]
[ContentType("TypeScript")]
[ContentType("SQL")]
[ContentType("SQL Server Tools")]
[ContentType("php")]
[ContentType("phalanger")]
[ContentType("Code++")]
[ContentType("XSharp")]
[ContentType("Razor")]
[ContentType("LegacyRazorVisualBasic")]
[ContentType("WebForms")]
[ContentType("html-delegation")]
/* ... */
iz0eyj commented 3 months ago

Thanks @lordfanger, but because the change is trivial I think it would be better if it were done by @madskristensen on the main branch. I really don't think it's worth doing a fork for something so small.

madskristensen commented 3 months ago

If you can tell me the content type string for D in Visual Studio, I can add it asap

iz0eyj commented 2 months ago

If you can tell me the content type string for D in Visual Studio, I can add it asap

I'm afraid I don't know, but I have the extension installed on the VS and if you tell me where to look I'll find the information.

lordfanger commented 2 months ago

In github repo I see frequently [ContentType("d")]. Maybe it will be this.

madskristensen commented 2 months ago

I just added the content type. Grab the CI build and see if it works for you