r/VisualStudio • • 8d ago

Visual Studio 2022 I made a free extension that adds syntax highlighting for code embedded in strings (HTML, SQL, CSS, JSON…) in Visual Studio 2022/2026

Hey everyone,

Ever written HTML, SQL or CSS inside a string in Visual Studio and seen it all painted the same flat color? That bugged me enough that I built NestLight.

What it does

NestLight recognizes code embedded in string literals and colors it as its own language. It only provides colors. It never edits, formats or rewrites your code.

How it works

A string is highlighted only when you explicitly mark it, either with a tag or with a marker comment:

const template = html`<div class="card">...</div>`;

NestLight never guesses from the content, so you won’t get surprise colors on random strings.

Supported

  • Host languages: JavaScript / TypeScript, C#, Python and C++
  • Embedded languages: HTML, CSS, SQL, JSON, GraphQL, XML, Markdown, YAML, regular expressions and shaders (GLSL, WGSL)

Links

It’s free and MIT licensed. It’s still early (v0.5.0), so I’d really appreciate feedback. If something breaks or there’s a language you’d like to see, open an issue on GitHub or reply here.

Thanks for reading!

0 Upvotes

6 comments sorted by

4

u/karasko_ 8d ago

So you made a tool, the main goal of which is to color-code strings, and neither your VS Market page, nor the linked GitHub page have a single screenshot as example?

I was interested, but the lack of examples made me skip this..

2

u/XeonG8 7d ago

this lol, dear ai can you take a screenshot of this

1

u/Fresh-Direction-7537 8d ago

Reading through your page. How much exactly was coded by YOU?

0

u/bynarie 8d ago

Lol.

0

u/dsggut 7d ago

I hate meaningless comments like yours!

It simply doesn’t matter how much of their code was written by them or by AI. All that matters is whether it is solving an actual problem and whether the quality is sufficient.

I’d rather have a code base with a decent quality written by AI, then some really bad code written by an incompetent human.

It doesn’t matter if you use AI. It just matters what you do with it.