README file from
GithubWhole-Tree Search for Obsidian
A fast, lightweight Obsidian search plugin that extracts and renders hierarchical Markdown list blocks—displaying the matched line, its parent(s), and all nested children based on outline indentation.
Why this suite exists
I created this suite of Obsidian plugins and the DoomEsque theme so that I can be 100 percent certain there are no network calls or traffic: everything runs 100 percent offline, so I can use Obsidian for my notes in open-book law exams.
- Nothing in the suite makes a network request. Every test run checks the source, built bundle and styles with
scripts/offline-audit.mjs, which fails on any network API (fetch,XMLHttpRequest, WebSocket,requestUrl, ...). - Obsidian itself has separate online features. For a fully offline setup, also turn off automatic updates, Sync and Publish, and don't browse community plugins during the exam.
The suite:
- DoomEsque (theme)
- DoomEsque Settings
- Filetypes
- Inline Autocomplete
- Inline Schema Expander
- Links in New Tabs
- Pomodoro Flashcards
- Task Docket
- Whole-Tree Search
The Problem
When searching through outlines, nested task lists, or meeting notes in Obsidian, standard search displays only the isolated matching line. You lose:
- Which project or milestone the task belonged to (the parent context).
- Which subtasks or action points were grouped underneath it (the child context).
The Solution
Whole-Tree Search searches your vault and reconstructs the full hierarchical tree block:
- Project Alpha <-- [Immediate Parent]
- Milestone 1: Database Schema <-- [MATCHED LINE]
- Users table <-- [Nested Child 1]
- Sessions table <-- [Nested Child 2]
Features
- Hierarchical Outline Context: Instantly visualizes the parent item and all child items of any matched line based on indentation (spaces or tabs).
- Rich Markdown Preview: Renders search results using Obsidian's native Markdown renderer, preserving formatting, tags, code snippets, and internal links.
- Fast Vault Traversal: Uses Obsidian's
cachedReadAPI and query cancellation to ensure smooth, responsive search even across large vaults. - Keyboard Navigation:
↑/↓: Navigate suggestions.↵(Enter): Jump directly to the matched line in the note.mod + ↵(Cmd + Enter/Ctrl + Enter): Open note in a new tab/pane at the matched line.esc: Dismiss search modal.
- 100% Offline & Private: Zero network calls, zero telemetry, and zero external dependencies. Confined strictly to your local vault.
- Mobile & Desktop Compatible: Works seamlessly on macOS, Windows, Linux, iOS, and Android.
Security & Privacy Policy
Whole-Tree Search is built with strict privacy and security principles:
- Zero Network Calls: The plugin makes no network calls, HTTP requests, WebSockets, or remote telemetry pings.
- Offline audit: Every test run checks the source, built bundle and styles with
scripts/offline-audit.mjs, which fails on any network API (fetch,XMLHttpRequest, WebSocket,requestUrl, workers, dynamicimport(), ...), dynamic code (eval,new Function), raw HTML injection, or remote CSS (@import, non-data:url()). - Remote content is never loaded: Before a result is rendered, remote images (
), raw HTML that loads resources (<img>,<iframe>,<video>, ...) and embeds of other notes are neutralised, so searching never makes a network request. Embeds of local images, audio, video and PDFs still show. - Confined to Local Vault: The plugin reads Markdown files within your vault using Obsidian's official
app.vaultAPI and does not touch files outside your vault. - Safe DOM Rendering: All user interface elements are rendered using Obsidian's official DOM creation and
MarkdownRenderer.renderAPIs. No raw HTML strings orevalstatements are used. - No Memory Leaks: Suggestion components adhere to Obsidian's
Componentlifecycle management, properly loading and unloading DOM listeners between keystrokes and modal sessions.
Installation
Community Plugins
- Open Settings > Community plugins in Obsidian.
- Turn off Restricted mode.
- Click Browse and search for
Whole-Tree Search. - Click Install, then Enable.
Manual Installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest GitHub Release. - Create a folder named
whole-tree-searchin your vault's plugin directory:<vault>/.obsidian/plugins/whole-tree-search/. - Copy the downloaded files into that folder.
- Reload Obsidian and enable Whole-Tree Search under Community plugins.
Usage
- Open the Command Palette (
Ctrl + PorCmd + P). - Type and select Open whole-tree search.
- Type your search query.
- Press
Enterto navigate to the matched line in the note, orCmd/Ctrl + Enterto open in a new tab.
(Tip: Assign a custom hotkey to Open whole-tree search in Settings > Hotkeys for quick access).
Settings
Open Settings > Community plugins > Whole-Tree Search to configure the options below. On Obsidian 1.13+ every setting is also discoverable through the settings search.
| Setting | Default | Description |
|---|---|---|
| Maximum results | 50 | Stop searching once this many matches are found. |
| Minimum query length | 1 | Characters to type before searching starts. |
| Case sensitive | Off | Match the exact capitalization of the query. |
| Ignore frontmatter | Off | Skip matches inside YAML frontmatter. |
| Excluded folders | — | Folders (one per line) whose notes are never searched, including subfolders. |
| Ancestor levels | 1 | Parent levels shown above the match (0 = none, 1 = immediate parent, higher = full path). |
| Show nested children | On | Include items nested beneath the match. |
| Maximum child depth | 0 | Levels of children to show (0 = all). |
| Blank lines end a block | On | Treat empty lines as the end of an outline; turn off for lists with blank lines between items. |
| Tab width | 4 | Spaces a tab counts as when comparing mixed tab/space indentation. |
| Open in new tab by default | Off | Swap Enter and Mod + Enter so results open in a new tab by default. |
Development
# Install dependencies
npm install
# Run unit tests
npm test
# Build for development
npm run dev
# Build for production
npm run build
License
MIT © blursedperf