-
-
Notifications
You must be signed in to change notification settings - Fork 447
Closed as not planned
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am currently working on a feature for charmbracelet/freeze which makes use of the chroma library and I am using the DelegatingLexer where I am passing two languages py and go as the language and root respectively. My PR implementation can be seen here: charmbracelet/freeze#79
Using
As it can be seen chroma doesn't highlight the root of the lexers.DelegatingLexer. Only the language part is highlighted. However, this is not always the case.
./freeze --language jinja,html file.jinjagives
./freeze --language jinja file.jinjagives
In this case, jinja,html languages correctly highlight the code snippet.
To Reproduce
Chroma Playground doesn't support syntax highlighting of two languages at one time.
To locally reproduce this:
- Clone https://github.com/Delta456/freeze/tree/multi_lang
- Run
go build . - Run
./freeze --language py,go file.py
Contents of file.py:
def hello():
print('hello world')
func Hello() {
fmt.Println("Hello world")
}



