Sugar High
approvedby ankitchouhan1020
Highlight rendered code blocks with Sugar High's lightweight semantic syntax colours. - This plugin has not been manually reviewed by Obsidian staff.
Sugar High for Obsidian
Lightweight semantic syntax highlighting for rendered fenced code blocks in Obsidian, powered by Sugar High.
Features
- Highlights 25 programming languages and common Markdown fence aliases.
- Uses Sugar High's semantic light and dark palettes.
- Optionally shows language labels and line numbers.
- Includes a native copy button.
- Leaves unsupported fences to Obsidian's native renderer.
- Works on desktop and mobile without network access.
- Never rewrites note content.
Sugar High applies to Reading view and rendered previews. Editing inside a fenced block continues to use Obsidian's native CodeMirror highlighting.
Usage
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#.
Installation
Community plugins
Once published, install Sugar High from Obsidian's Community plugins directory.
Requires Obsidian 1.13.0 or newer.
Manual installation
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.
Development
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.
Releasing
- Run
npm version patch,npm version minor, ornpm version major. - Commit the version changes and push them.
- Create and push an annotated tag matching
manifest.jsonexactly, without avprefix. - GitHub Actions builds and attests the three release assets and creates a draft release.
- Add release notes and publish the draft.
For the initial Community directory submission, publish the 1.0.0 release first, then submit the GitHub repository through Obsidian's Community directory.
Privacy and security
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.
Credits
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.
License
MIT © 2026 Ankit Chouhan.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.