# Sugar High for Obsidian Lightweight semantic syntax highlighting for rendered fenced code blocks in Obsidian, powered by [Sugar High](https://github.com/huozhi/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: ````markdown ```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: ```text /.obsidian/plugins/sugar-high/ ``` Then reload Obsidian and enable **Sugar High** under Community plugins. ## Development ```sh 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 1. Run `npm version patch`, `npm version minor`, or `npm version major`. 2. Commit the version changes and push them. 3. Create and push an annotated tag matching `manifest.json` exactly, without a `v` prefix. 4. GitHub Actions builds and attests the three release assets and creates a draft release. 5. 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](https://community.obsidian.md/). ## 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](https://github.com/huozhi/sugar-high) syntax highlighter created by [Jiachi Liu (huozhi)](https://github.com/huozhi). Sugar High is bundled as a dependency and declares the MIT license. See [Third-party notices](./THIRD_PARTY_NOTICES.md). This project is an independent Obsidian integration and is not affiliated with or endorsed by the Sugar High maintainers or Obsidian. ## License [MIT](./LICENSE) © 2026 Ankit Chouhan.