Auto-expand backlinks
approvedby younggyolee
This plugin has not been manually reviewed by Obsidian staff. Automatically expand the surrounding context of each match in the backlinks panel, similar to Roam Research.
Auto-Expand Backlinks
An Obsidian plugin that automatically expands the context shown in the bottom backlinks panel (and the standalone backlinks pane) so you don't have to click the chevrons on every match — giving you a Roam Research-style backlinks view where each linked mention appears with its surrounding bullets / paragraph already expanded.
Inspired by this forum request: https://forum.obsidian.md/t/backlink-to-display-more-context-by-default/102810
What it does
When you open a note, this plugin:
- Forces the backlinks panel's "Show more context" toggle on.
- Programmatically clicks each match's "show more above" / "show more below" chevrons a configurable number of times — revealing the surrounding lines (or sub-bullets) without manual clicks.
Settings
| Setting | Default | What it does |
|---|---|---|
| Enabled | on | Master toggle. |
| Show more context | on | Forces the panel's "Show more context" header toggle on by default. |
| Expand below (levels) | 5 | How many times to click each match's "show more below" chevron. Tune to taste. |
| Expand above (levels) | 0 | How many times to click each match's "show more above" chevron. |
| Apply delay (ms) | 200 | Wait between file open and applying expansion. Increase for slow vaults. |
| Per-click delay (ms) | 20 | Pause between successive expand clicks. |
Install via BRAT (recommended for now)
- Install the BRAT plugin.
- Open BRAT settings → Add Beta plugin.
- Enter this repo URL.
- Enable Auto-Expand Backlinks in Community plugins.
Install manually
Download main.js, manifest.json, styles.css from the latest release into <vault>/.obsidian/plugins/auto-expand-backlinks/, then enable in Settings → Community plugins.
How it works
Obsidian's backlinks panel doesn't expose a documented API for default expansion. This plugin reaches into the internal view.backlinks.backlinkDom to flip extraContext, then clicks the per-match .search-result-hover-button.mod-bottom / .mod-top DOM buttons that Obsidian uses for context expansion.
Because it relies on internal/undocumented APIs, it may break on future Obsidian releases.
Known limitations
- Only the bottom backlinks panel and the standalone backlinks pane are touched. The left-sidebar search panel is not (intentionally — different use case).
- Each "level" of expansion = one click of the chevron = one more line of context in Obsidian's source file.
License
MIT — see LICENSE.
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.