# Plugin: Codeblock Customizer - Everything you need to customize your code blocks

**URL:** <https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152>\
**Category:** Plugins\
**Tags:** plugin-release\
**Created:** [March 11, 2026, 11:15am UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152 "2026-03-11T11:15:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [March 11, 2026, 11:15am UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/1 "2026-03-11T11:15:48Z")

</div>

A plugin to customize your code blocks in every possible way. The plugin is highly customizable. There are a lot of parameters, and a lot of options you can use. I will not document everything here, just the main things, so you get an idea what it can do.

The repo is available here: [GitHub - mugiwara85/CodeblockCustomizer: Codeblock Customizer plugin for Obsidian · GitHub](https://github.com/mugiwara85/CodeblockCustomizer) and the plugin can be installed from the official Obsidian marketplace here: [Obsidian Community](https://obsidian.md/plugins?search=codeblock%20customizer)

# Themes

The plugin comes with 6 default Themes: Obsidian, Solarized, Dracula, Gruvbox, Nord, Tokyo Night. Default is the Obsidian theme. You can create your own themes, or modify existing ones.

For a simple example here is the Obsidian Theme

 ![image](https://forum.obsidian.md/uploads/default/original/3X/3/4/34e3c83dd411e1fbc176c88dc3a2c6c944e019ff.jpeg)

And here is the Solarized Theme (rest is on GitHub):

 ![image](https://forum.obsidian.md/uploads/default/original/3X/e/1/e194689ce10e1db91c036776e883c79236e88ae3.jpeg)

# Header

You can display a “header“ (a bar above of the code blocks), which can display a filename/title, language tag and icons.

![Header](https://forum.obsidian.md/uploads/default/original/3X/1/c/1cc37c7b98258c996ec6c58368f2edf35b2a770b.gif)

# Line Number Jumps

Want to display specific line numbers at specific rows? You can do that. Simply specify at which line to what the linenumbering should change. There will be a separator inserted so it is more visisble.

 ![LineNumberJump](https://forum.obsidian.md/uploads/default/original/3X/c/1/c1cbb21b15cf2dee611689e6a6fca2c5f50cd6d0.png)

# Folding / Semi-Folding

When the header is present you can fold code blocks, either fully, or semi-fold (if enabled and the code block has enough lines) by clicking on it. You can define how many lines should be visible for semi-fold and what effect you want (decreasing opacity, increasing blurring or both).

![Folding](https://forum.obsidian.md/uploads/default/original/3X/b/2/b22ef110635df9dad1f7f62e9ecde578c71572c8.gif)

# Highlighting Lines and Text

For highlighting there is a default highlight color, but you can create you own custom highlight colors as well.

You can highlight:

- lines or ranges, by defining either line numbers or a specific word

- specific text, and you can also define which occurence to highlight

![Highlighting](https://forum.obsidian.md/uploads/default/original/3X/d/7/d749da6641e0dad70f19e6adf4ca3af560f3b9fd.gif)

# Language Specific Coloring

Define specific coloring rules for language. For example you can define that all the bash code blocks should have specific background colors, and all the JavaScript code blocks should have a totally different background color. (You can a define a lot more colors, not just the background color.)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/7/c/7ceb572f3e7bd0bd5bc952df422877e65a09863c.png)

# Grouped Code Blocks

Create grouped codeblocks by defining a group. Ideal when you have the same code in different languages.

![Grouped](https://forum.obsidian.md/uploads/default/original/3X/7/e/7ed7dc6c035846c4f70b2cef65dfc4a7f17be5e5.gif)

# Terminal Prompts

Use terminal prompts to make the code nice. There are two ways you can use this. You can either use semi-interactive prompts, or parse raw cli output. Semi-interactive prompts mean, that they react to some commands (simpler ones) e.g. cd, su, pwd etc. Parsing raw CLI output means, that if you paste CLI output in the code block which contains prompts, then you parse them, to assign color for the prompts.

![Prompts](https://forum.obsidian.md/uploads/default/original/3X/2/2/22116e7f8d5c22be7454537349c106a15cafd712.gif)

# Links

Use links in code (comments only) or in the header, which will render as clickable links.

![Links](https://forum.obsidian.md/uploads/default/original/3X/f/1/f1e8a2902076442745f2075f21fcb9430d2c7890.gif)

# Syntax highlight Inline code

Syntax highlighting inline code is simply done by specifying the language for the inline code in {} before the code.

![InlineCode](https://forum.obsidian.md/uploads/default/original/3X/d/9/d9a1af0b3b7dc3398be3c80866a507aa60673ff0.gif)

# Annotations

Want to keep your code clean? Use annotations in comments! They will render as a small icon at the beginning of the lines.

![Annotations](https://forum.obsidian.md/uploads/default/original/3X/c/6/c6f537a002761344ccad023571320728e675e059.gif)

# Hiding Lines

Want to hide lines or ranges? You can do that as well.

![Hide](https://forum.obsidian.md/uploads/default/original/3X/4/a/4a2f1c5245fbce511ec77e47c8cafe5d7d2e7c9b.gif)

# Wrap/Unwrap Code

Wrap/Unwrap long code with a click of a button in both editing and reading mode.

![WrapLines](https://forum.obsidian.md/uploads/default/original/3X/b/4/b45833011ad3933c3df7e00cc3dd3992c733222c.gif)

# Indent Code Blocks in Lists

In editing mode and in reading mode, code blocks in lists are indented as they should be.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/e/f/efc130aae89d21248fea711316eef4a59ea309ee.png)

# Bracket Highlight

Forgot where the opening or closing bracket is? Use bracket highlight. It will highlight the corresponding pair with a specific color. You can define to use a different color if the bracket doesn’t

![BracketHighlight](https://forum.obsidian.md/uploads/default/original/3X/1/e/1ea2afe5d263423b6d6ddb4acba7578285e1304a.gif)

# Selection Matching

Highlight text and the same text in other lines will be automatically highlighted if selection matching is enabled.

![SelectionMatching](https://forum.obsidian.md/uploads/default/original/3X/9/b/9b3d0a17191f91f6d31b452d47d3d005e8f8278b.gif)

# Plugin Compatibility

Compatible with Admonitions and Execute Code plugins.

Admonition will render like this:

 ![Admonition](https://forum.obsidian.md/uploads/default/original/3X/f/1/f1f636703dde78f8f7284e55dcb16a4f3cacaa93.png)

Execute Code works like this:

![ExecuteCode](https://forum.obsidian.md/uploads/default/original/3X/4/e/4e412dbe4f8dba13bce5fabdea464364944d5064.gif)

Do you have an idea what to implement next? Open an issue on Github.

---

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [March 11, 2026, 11:10pm UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/2 "2026-03-11T23:10:50Z")

</div>

# **Version 1.4.1 adds a new option**

There is a new setting called “ **Use PrismJS syntax highlighting in editor mode** “ under “ **Appearance & Styling** “.

This is an **experimental** setting, but it is worth talking about this.

It forces the editor to use `PrismJS` in editor mode. This results, that when this setting is enabled, the syntax highlighting is the **same** in **editing and reading modes**! But that’s not all! This setting also has a positive side effect. `CodeMirror` does support a lot of languages, but nearly not as many as `PrismJS`. When this setting is enabled, that also means that languages which `CodeMirror` does not support (e.g. `graphql` or `makefile` or `hlsl`) also get syntax highlighting, because `PrismJS` does support it.

Even though this setting is not as thourughly tested as others, I wanted to release it easlier. Should you encounter some errors or bugs, just open an issue.

Example code block in editor mode with the setting disabled:

[![PrismDisabled](https://github.com/mugiwara85/CodeblockCustomizer/raw/master/attachments/PrismDisabled.png)](https://github.com/mugiwara85/CodeblockCustomizer/blob/master/attachments/PrismDisabled.png)

Same code block with setting enabled (matches reading mode):

[![PrismEnabled](https://github.com/mugiwara85/CodeblockCustomizer/raw/master/attachments/PrismEnabled.png)](https://github.com/mugiwara85/CodeblockCustomizer/blob/master/attachments/PrismEnabled.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Schmall](https://forum.obsidian.md/user_avatar/forum.obsidian.md/thomas_schmall/32/51382_2.png) [@Thomas\_Schmall](https://forum.obsidian.md/u/Thomas_Schmall)\
**Post date:** [March 12, 2026, 3:55pm UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/3 "2026-03-12T15:55:02Z")

</div>

This is amazing - that must have been a huge amount of work.

The header and the inline code function seems especially handy. I’ll give it a shot. Thanks for publishing it.

---

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [March 12, 2026, 4:06pm UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/4 "2026-03-12T16:06:45Z")

</div>

Yeah, it took a “little“ time 😃

Glad you like it. There are a lot of settings in the settings page as well. Click it through once. Most of them are self-explanatory, so I didn’t document them.

---

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [March 23, 2026, 12:22am UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/5 "2026-03-23T00:22:55Z")

</div>

## Version 1.4.2 new feature: Syntax Themes

Syntax Themes let you change the colors used for syntax highlighting in code blocks. Pick a built-in theme or create your own. Each theme automatically adapts to Obsidian’s dark and light mode.

Built-in themes: Obsidian, Dracula, Gruvbox, Nord, Solarized, Tokyo Night, VS Code Modern, Monokai, GitHub, Catppuccin.

An example JavaScript code block, with the default `PrismJS` syntax highlighting:

 ![SyntaxThemeBefore](https://forum.obsidian.md/uploads/default/original/3X/e/f/efcbcba3e2096bc0ef781b02214805a9a623ccfb.png)

Same code block with `Nord` syntax theme applied:

 ![SyntaxThemeAfter](https://forum.obsidian.md/uploads/default/original/3X/9/a/9a1c784b12f7b279f8e67de8548d1ae2d90f96dd.png)

You can set a syntax theme globally for all languages, or override it for specific languages. For example, use Dracula globally but apply Nord to Python code blocks only.

> **Note**
> 
> This feature works only with `PrismJS` tokens. For the best result, enable `Use PrismJS for syntax highlighting in editor mode`. Without it, syntax themes only apply in reading mode, **\*\*not\*\*** in editing mode.

### **How it works**

Syntax highlighting works by analyzing the text in a code block. Each word is identified as a `token`, which can be a keyword (`if`, `else`), a string, a number, a comment, etc. A color is then assigned based on the token type. The full list of tokens can be found [here]( [Prism tokens ▲ Prism](https://prismjs.com/tokens.html) ). Syntax Themes let you customize the color for each of these token types.

---

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [March 31, 2026, 1:07am UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/6 "2026-03-31T01:07:53Z")

</div>

## Version 1.4.5 new feature: Syntax Highlighting for Custom Languages

`PrismJS` provides syntax highlighting for a lot of languages, but there are still some, which it doesn’t support. This feature lets you define your own syntax highlighting rules for those unsupported languages by creating a JSON configuration file. If `Use PrismJS for syntax highlighting in editor mode` is enabled (see [PrismJS Syntax Highlighting](https://github.com/mugiwara85/CodeblockCustomizer?tab=readme-ov-file#prismjs-syntax-highlighting)), the rules apply in both editor and reading mode. If it is not enabled, the rules will only apply in reading mode.

To get started, create a `customPrismLanguages.json` file in your `<VaultFolder>\.obsidian\plugins\codeblock-customizer\` folder. In this file you can define the RegExes used by `PrismJS` to provide syntax highlighting for those languages. You will need to define RegExes for the [tokens](https://prismjs.com/tokens.html). There are a few examples on the official `PrismJS` [website](https://prismjs.com/extending.html).

> Important  
> The RegExes are stored as strings in the `customPrismLanguages.json` file. This means, that you will have to escape the backslashes. So instead of one backslash (`\`), you’ll have to write two (`\\`).

> Note  
> If the JSON file is malformed or contains invalid RegExes, a notice will be shown when the plugin loads.

A sample `customPrismLanguages.json` which provides syntax highlighting for the `ma3` language would look like this:

```json
{
  "ma3": {
    "comment": "/(^|[^\\\\#])#.*/gim",
    "string": [
      {
        "pattern": "/'(?:\\\\[\\s\\S]|[^\\\\''])*'/",
        "greedy": true
      },
      {
        "pattern": "/\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"/",
        "greedy": true
      }
    ],
    "number": "/(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)/gi",
    "operator": "/[-+*%]/",
    "slashModifier": {
      "pattern": "/(\\/\\w+)/",
      "alias": "class-name"
    },
    "macroInputPrompt": {
      "pattern": "/\\((?:\\\\[\\s\\S]|[^\\\\(\\\\)])*\\)/",
      "alias": "variable",
      "greedy": true
    },
    "macroVariableResolve": {
      "pattern": "/\\$.[^\\s]*/",
      "alias": "variable",
      "greedy": true
    },
    "keyword": "/\\b(?:\\w+)\\b/"
  }
}

```

`ma3` language without custom syntax highlight definition:

 ![Ma3WithoutCustomPrismLanguageDefitions](https://forum.obsidian.md/uploads/default/original/3X/4/0/4095c009fafa99cfe9b6ee03a135d657317f6830.png)

`ma3` language with custom syntax highlight definition:

 ![Ma3WithCustomPrismLanguageDefitions](https://forum.obsidian.md/uploads/default/original/3X/0/d/0d92d3a31f22266be162643664d2e73779940b73.png)

---

<div class="post-metadata">

**Author:** ![mugiwara](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@mugiwara](https://forum.obsidian.md/u/mugiwara)\
**Post date:** [November 29, 2026, 1:15pm UTC](https://forum.obsidian.md/t/plugin-codeblock-customizer-everything-you-need-to-customize-your-code-blocks/112152/7 "2026-11-29T13:15:08Z")

</div>

# Version 1.5.0 new features

- `expand` parameter. Using this parameter code blocks expand to full width, when the option `Readable line length` is enabled

 ![image](https://forum.obsidian.md/uploads/default/original/3X/a/1/a1c77ea6d46edf6baa7d8d399bd99c9d08ec3ac8.png)

- Text styling for highlighted lines and inline code. It is possible now to select for every highlighting parameter (default or alternative) and inline code the following styles: text color, bold, italic, underline, strikethrough and font family. Highlighted text can also be set to subscript.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/e/3/e3dcaa139e823e13e53b0fcc1cb31d65ba8dc506.png)

- Inline code supports now line and text highlighting
- Support for raw HTML code blocks  
 ![HTMLCodeBlocks](https://forum.obsidian.md/uploads/default/original/3X/2/b/2b27ddceb6b074bbcc64ecde7f0fffcccdc8c04b.gif)
- Syntax themes are applied to inline code as well
- Added option to specify “Additional Execute Code languages” for forks of Execute Code that support more languages
