I have been putting together a language model for Astro templates, which 
are a mix of JavaScript/TypeScript, and JSX-like syntax for template bodies.

I have made good progress and already have something that's quite a nice 
DX, but the one thing I can't get my head around is how to achieve syntax 
coloring for HTML-like tags.

Is there any established method to achieve this? I notice that the 
HTML-like first party languages (HTML, XML, Vue.js) aren't listed in 
`/BBEdit.app/Contents/PlugIns/Language Modules/`, which makes me think 
they're created in a more sophisticated way, which would make sense.

Currently I am using a CLM, but I'd be happy to switch to the coded 
language module approach if it enabled highlighting HTML-like tags.

In case this isn't currently achievable, what I would image as the perfect 
feature addition would be a boolean flag in the plist that says "this is an 
XML-like language" which triggers piggy-backing on the tag syntax 
highlighting of the first-party languages. That would be amazingly useful, 
if feasible to implement, to be able to create language modules quite 
easily for any of the countless template languages out there and have them 
feel on par with the first-party ones.

Cheers, Ross

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or believe that the application isn't working correctly, please email 
"[email protected]" rather than posting here. Follow @bbedit on Mastodon: 
<https://mastodon.social/@bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/bbedit/e729a496-98f7-41de-80da-b6098a589a0cn%40googlegroups.com.

Reply via email to