To enable code block syntax highlighting, you can extend the editor's default schema with a new codeBlock, which you can pass options into when creating. By passing the default options from @blocknote/code-block, you can enable syntax highlighting. This is excluded by default to reduce bundle size.
Relevant Docs: