org-roam-ui
org-roam-ui copied to clipboard
[MINOR] Does any theme support code highlighting?
I have tried almost every theme in org-roam-ui, but none of them can display code block properply. It would be more readable if code block support highlighting. My question is if there is a theme or setting can support code block highlighting(may be I missed something). If not, I think it would be a nice feature to support. Thank you.
No not at the moment, sorry! Syntax highlighting is not that difficult to add, in fact the implementation is sort of there already, just commented out, but
- It's slow, and makes the application much larger, and
- Not all languages are supported, most importantly: elisp. There's probably a way to fake this by extending the lisp syntax.
- Need to implement the highlighting in the themes
Should all not be too difficult, but I hadn't gotten around to it due, I'll work on it!
Prism actually does support elisp, great!
FWIW, I use the following setup for my blog:
import prism from '@mapbox/rehype-prism';
const processor = unified()
...
.use(prism, {
ignoreMissing: true,
alias: {
lisp: 'common-lisp',
},
})
...
It works fine for me!
(reposted because email replies do not support markdown :confused:)
Ah yes, that should work! I actually stole this tip for Emacs Docs, and then promptly forgot to implement this here. Will be added in a sec