Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it named Dockerfile or Dockerfile.jinja?


It’s named Dockerfile. However, I suspect if it’s named jinja, the Docker parts won’t be syntax highlighted!?!?


In my experience, yes. But you can't really expect a syntax highlighter to support every combination of template language and file language, so this seems reasonable enough.


I understand the limitation. Especially in the context of having the entire syntax tree parsed and stored like Zed.

I didn’t expect it to highlight 2 languages. I just wanted the Dockefile parts to be highlighted. But Zed stopped any highlighting after the first curly brace, which produces inferior results compared to the regex (assuming) based highlighters out there.


Right but the curly brace is invalid syntax in a Dockerfile. It's valid IMO for the parser to bail when it encounters this.

I see what you're saying that other highlighters are continuing gracefully though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: