ankitchouhan102042 downloadsHighlight rendered code blocks with Sugar High's lightweight semantic syntax colours.
Lightweight semantic syntax highlighting for rendered fenced code blocks in Obsidian, powered by Sugar High.
Sugar High applies to Reading view and rendered previews. Editing inside a fenced block continues to use Obsidian's native CodeMirror highlighting.
Add a supported language to a Markdown fence:
```typescript
class InterviewQueue {
next(candidate: string) {
return candidate ?? "Nobody waiting";
}
}
```
Open the note in Reading view. Use Settings → Sugar High or the Command Palette to toggle language labels and line numbers.
Supported languages include JavaScript, TypeScript, CSS, Python, C, Go, Java, Rust, JSON, Diff, Shell, C++, C#, SQL, HTML, YAML, Markdown, Kotlin, Swift, PHP, TOML, PowerShell, Dockerfile, GraphQL, and HCL.
Obsidian cannot safely register symbolic fence aliases as CSS selectors. Use cpp instead of c++, and csharp or cs instead of c#.
Once published, install Sugar High from Obsidian's Community plugins directory.
Requires Obsidian 1.13.0 or newer.
Download main.js, manifest.json, and styles.css from the latest GitHub release. Place them in:
<vault>/.obsidian/plugins/sugar-high/
Then reload Obsidian and enable Sugar High under Community plugins.
npm ci
npm run check
npm run build produces the minified main.js release artifact. Compiled output is intentionally excluded from the repository and attached to GitHub releases instead.
npm version patch, npm version minor, or npm version major.manifest.json exactly, without a v prefix.For the initial Community directory submission, publish the 1.0.0 release first, then submit the GitHub repository through Obsidian's Community directory.
Sugar High for Obsidian runs entirely locally. It has no telemetry, accounts, payments, advertisements, or network requests. It does not access files outside the vault or modify notes.
This integration is powered by the excellent Sugar High syntax highlighter created by Jiachi Liu (huozhi). Sugar High is bundled as a dependency and declares the MIT license. See Third-party notices.
This project is an independent Obsidian integration and is not affiliated with or endorsed by the Sugar High maintainers or Obsidian.
MIT © 2026 Ankit Chouhan.