Disable Code Block

The automatic code block coloring is an annoying feature. I’m trying to take notes, not write code. It seems like it should be a simple request. Editors like Atom don’t have this problem. I’d rather use Obsidian for the graph view, but the automatic code block highlighting has me seriously reconsidering. And from the forums I’m not the only one. Why can’t this be optional?

1 Like

If this is true, please add to the previous feature request instead of creating a new one.

For what it’s worth, code blocks are a core part of markdown, and Obsidian is fundamentally a markdown editor. In fact, if you set up Atom as a markdown editor, it would also recognize code blocks.

Obsidian actually extends code blocks to make them more useful for people who do not use code. See e.g., the use of Mermaid for making diagrams, or various plugins’ use of code blocks to instantiate their features (e.g., dataview).

If you never use code, you could consider restyling generic code blocks to do something useful for you. Some users use code blocks to write and represent poetry, for example.

Obsidian will only create code blocks if the user types standard Markdown keystrokes for code blocks: back ticks or indents.

Avoid those and you should never see code-block colouring.


1 Like