Repository navigation
Releases: yunforge/obsidian-source-peek
Releases · yunforge/obsidian-source-peek
Release list
1.0.1
No feature changes — this release clears two advisories from the community directory's automated review.
- The UI language is now read through Obsidian's own
moment.locale()instead of thelanguagekey inlocalStorage. - The stylesheet no longer uses
!important: the hidden state is expressed as.cp-hover.cp-hidden.
Everything else is untouched.
1.0.0
Initial release.
Source Peek previews what a link points at, right where you're reading: rest the pointer on a link and a panel appears showing the lines of a source file, a file inside a repository, or a section of a web page.
Highlights
- Local source files —
[the parser](../src/main.c#L18), or a range with#L18-L23. Only the lines you named, with syntax highlighting by file extension. Paths resolve from the note and are bounded by the vault. - Repository files — GitHub and GitLab blob links are fetched at their raw URL and previewed exactly like local files.
- Web pages — preview the whole page, or take just a section by heading:
#install,#install-usage,#-#install,#install-. A heading is matched by its element id, its slugged text, or the text itself. - Structured rendering — headings keep their level, lists get bullets, quotes get a border, and code blocks keep their indentation, syntax highlighting, and sideways scrolling.
- A panel you can use — move into it, scroll it, select text from it. It closes on scroll, on Escape, on a click elsewhere, and when the window loses focus.
- Matches Obsidian — a plain hover in reading view, Ctrl + hover in the editor (Cmd on a Mac), the same split as the built-in page preview. Ordinary vault links and attachments are untouched.
- English and Simplified Chinese interface, following Obsidian's language setting.
Install
Copy main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/source-peek/, then enable the plugin.
Requires Obsidian 1.4.0 or newer. Desktop only — it reads source files through Node's filesystem API.
Known limits
- Pages rendered by JavaScript arrive as an empty shell — the plugin fetches HTML and runs no scripts.
- Very long pages are slow to draw whole; narrow them with a heading fragment.