chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Angular lexer support

Open Foxandxss opened this issue 3 years ago • 3 comments

The current HTML lexer is very nice, but it doesn't support angular syntax, see this screenshot as an example:

Perhaps a new "Angular" setting like react or vue.

What do you think? Thanks

Foxandxss avatar Jun 13 '21 10:06 Foxandxss

I stumbled accross the "angular2" lexer. Somehow I missed it. Although, reading pygments docs, they seem to support "complex?" lexers. Something like html+ng2 so they have both applied together.

Is that something supported by chroma?

Thanks.

Foxandxss avatar Jun 13 '21 14:06 Foxandxss

Yes nested lexers are supported by Chroma. HTML+PHP is a good example of this.

alecthomas avatar Sep 18 '21 08:09 alecthomas

@alecthomas was just curious, if there is a way to nest HTML+vue lexers? Ref: #456 .

PS: I tried to tweak some code for fixing it but didn't reach to any conclusion on the fix. Will try to give it a go again.

siddhant-deepsource avatar Sep 18 '21 15:09 siddhant-deepsource