guyu32 downloadsAdd selection or cursor annotations to notes and edit them in a native sidebar.
中文 · English
Add selection- or cursor-based annotations to any Markdown note, and read or edit them in a native sidebar. Every annotated note gets a companion annotation file in the same folder, with the same name and a different suffix, so your Markdown source stays untouched.
The plugin interface is currently available in Chinese only.
In Obsidian, open Settings → Community plugins → Browse, search for "Annotation Sidebar", then install and enable it.
npm install and npm run build in the repository root.<Vault>/.obsidian/plugins/annotation-sidebar/ in your vault.main.js, manifest.json, and styles.css from dist/ into that folder.dist/ is a self-contained build output: every build cleans it and regenerates it, so its contents can be installed or published as-is. You can also download these three files from the latest GitHub release.
The message icon in the ribbon and the command "批注侧栏:打开批注侧栏" (Annotation Sidebar: open annotation sidebar) both open the panel. The plus button in the sidebar header adds an annotation at the most recent selection or cursor position in a Markdown editor.
With Settings → 批注侧栏 → 在正文中显示批注 enabled, both edit mode and reading mode show a read-only annotation block below the line where the annotation anchor ends. Once the sidebar is open, the "正文显示" toggle in its header switches this on and off. Inline blocks are drawn in a separate visual layer and never modify the Markdown file; clicking a block returns to the sidebar and focuses the matching input.
The default mapping is:
Notes/Design.md
Notes/Design.annotations.json
Annotation files are versioned JSON, which makes them easy to sync with Obsidian Sync, Git, or any other tool:
{
"version": 1,
"source": "Notes/Design.md",
"updatedAt": "2026-09-09T10:00:00.000Z",
"annotations": [
{
"id": "67a5c924-7817-46fe-bf6a-faa0ef03422a",
"content": "This needs a source.",
"type": "warn",
"createdAt": "2026-09-09T10:00:00.000Z",
"updatedAt": "2026-09-09T10:01:00.000Z",
"anchor": {
"kind": "selection",
"from": { "line": 3, "ch": 0, "offset": 42 },
"to": { "line": 3, "ch": 8, "offset": 50 },
"quote": "text to confirm",
"prefix": "end of previous paragraph",
"suffix": "start of next paragraph"
}
}
]
}
See the JSON Schema for the full structure. Avoid editing the same annotation file in Obsidian and an external editor at the same time.
.annotations.json. Changing it only affects files read and created afterwards; existing files are not migrated.process operation.For the architecture and trade-offs, see docs/DESIGN.md. For building, testing, and releasing, see docs/DEVELOPMENT.md.
Each annotation can be set to one of error, warn, note, or hint in the sidebar. They default to red, yellow, blue, and green; the colors can be customized in the settings and apply to the inline highlight, the position marker, inline annotation blocks, reading-mode blocks, and the sidebar cards.
Both type names and colors are configurable. When a type is deleted, its annotations move to another type that is kept.