Thanks to a tip-off by a friend, I recently switched over from
to a plugin called
which uses VS Code’s highlighting engine to perform syntax highlighting on during
build-time. Aside from the performance benefit from not having to execute
PrismJS, VS Code’s engine is a lot more powerful and sophisticated. You can read
more about its benefits in the README.
gatsby-remark-vscode also supports adding plugins from the VSCode ecosystem,
which means having access to the full unlimited range of VS Code themes and
syntax highlighting plugins for uncommon languages.
However, they both had custom
postinstall steps which did not allow them to be
installed properly. There’s a
npm install --ignore-scripts that you can use,
but it will affect all packages as well, which I didn’t want.
I ended up forking the
repos and removing the
postinstall steps. I don’t expect to have to keep up to date with upstream
much since this is just syntax highlighting, so this way suits me just fine.
npm install siawyoung/language-haskell siawyoung/vscode_erlang
then add the extensions to your
extensions: ["language-haskell", "erlang"],