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

htmlize.el if you use tree-sitter based syntax highlighting in emacs.

I’ve written one myself, it’s pretty simple to walk a tree-sitter parse tree and generate spans with classes based on the type of each node. Then syntax highlighting is “just” a matter of writing a bit of CSS.



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

Search: