Add custom codemirror extensions from a plugin?

Hello! I’m new to Logseq but very familiar with Obsidian, including its plugin API. Is there a way to add custom codemirror plugins (state facets, view plugins) to Logseq from a Logseq plugin, as there is in Obsidian? Thank you.