# Plugin: CodeBlock Language Detector

**URL:** <https://forum.obsidian.md/t/plugin-codeblock-language-detector/114774>\
**Category:** Plugins\
**Tags:** plugin-release\
**Created:** [May 29, 2026, 4:09pm UTC](https://forum.obsidian.md/t/plugin-codeblock-language-detector/114774 "2026-05-29T16:09:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bueckerlars](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@bueckerlars](https://forum.obsidian.md/u/bueckerlars)\
**Post date:** [May 29, 2026, 4:09pm UTC](https://forum.obsidian.md/t/plugin-codeblock-language-detector/114774/1 "2026-05-29T16:09:24Z")

</div>

> ## Plugin/Theme Disclaimer
> 
> Is this project **open source**? Yes  
> Is this project completely **free**? Yes  
> Is this project **vibe-coded** beyond the author’s ability to comprehend how it works? No  
> Community Directory: [Link](https://community.obsidian.md/plugins/codeblock-language-detector)

* * *

## Plugin: CodeBlock Language Detector

Hi! I just published **CodeBlock Language Detector** , a plugin that automatically identifies the programming language of unlabelled code blocks and adds the correct language tag - so you get proper syntax highlighting without having to type it yourself.

* * *

### The problem

If you paste code into Obsidian without specifying a language, you get a plain, unhighlighted block. Manually adding ````python` or ````javascript` to every snippet is tedious — especially when you’re pasting from Stack Overflow, a chat, or quickly jotting down a snippet mid-thought.

* * *

### What it does

The plugin scans your notes for code blocks that are missing a language tag and fills them in automatically. Detection can be triggered manually per-note or vault-wide.

**Features:**

- **70+ supported languages** : Python, JavaScript, TypeScript, Java, C/C++, Go, Rust, PHP, SQL, Bash, and many more
- **Dual detection engine** : combines [Highlight.js](https://highlightjs.org/) (battle-tested library, great for common languages) with custom pattern matching (useful for domain-specific or config languages)
- **Configurable detection order** : run Highlight.js first, Pattern Matching first, or use either alone
- **Confidence threshold** : set a minimum confidence level (0–100%) to control how aggressively the plugin tags blocks; higher = fewer false positives
- Works on individual notes (command palette) and across the entire vault
- No internet connection required: all detection runs locally

* * *

### Install

Search for **CodeBlock Language Detector** in Settings → Community plugins → Browse.

Or find it here: [CodeBlock Language Detector - Obsidian Plugin](https://obsidian.md/plugins?id=codeblock-language-detector)

GitHub: [GitHub - bueckerlars/obsidian-codeblock-language-detector: Automatically detects and adds language tags to code blocks · GitHub](https://github.com/bueckerlars/obsidian-codeblock-language-detector)

* * *

Feedback and bug reports are very welcome — especially for languages that get misidentified. The confidence threshold is your friend there while the detection improves!
