Syntax highlighting is done using either
prism.js. Once you've picked one, you'll have to set it up for code blocks: 1. within MDX and 2. outside MDX. That's how it works on all kinds of frameworks, not just Remix, although I'll post examples for Remix.
This setup is mostly a trivial task; however, there are a few niggles worth mentioning.