Make Obsidian's behavior on codeblocks dependant on their type

Currently Obsidian threats all codeblocks in the same way. This has some quirky side effects. It would be better to distinguish between code-containing codeblocks and text-containing codeblocks (ala admonition).

In text codeblocks, markdown auto-pairing should be enabled, suggestions should be enabled (tags, links), and linked and unlinked mention should be picked up.

In code codeblocks, markdown autopairing should be disabled, markdown suggestions should be disabled (tags, links), and linked and unlinked mention should not be picked up.

10 Likes

I’m having a related issue. I have an espanso shortcut that autopairs triple backticks for codeblocks for me already. I also have custom ones for admonition. I use it outside of Obsidian, but now that Obsidian has added it, I get a very dissatisfying set of five rows of triple backticks. Since I use other espanso shortcuts on Obsidian fine, I don’t want to turn the whole thing off when I go to Obsidian. So being able to customize autocomplete would be desirable.