obsidian-omnisearch
obsidian-omnisearch copied to clipboard
[Feature request] Option to open Omnisearch in the left sidebar like built-in Search
Could you consider providing the option to open Omnisearch inside the left sidebar (like the built-in Search, Bookmarks, FileTree, etc.)?
Advantages: the search dialog could remain open when editing or doing other tasks, rather than the current modal dialog.
in the meantime you can use the following dataviewjs script together with an inline dataview field Search::
const searchterm = dv.current().Search;
const results = await omnisearch.search(searchterm);
const arr = dv.array(results).sort(r => r.score, 'desc');
dv.table(['File', 'Score'], arr.map(o => [dv.fileLink(o.path), Math.round(o.score)]));
It would be good to have a function to also display the line context of the search term as a column
I've recently updated the API. In your example, you could get the context with o.excerpt
.
About this feature request, there's very little chance I ever implement it but the API should provide everything necessary to build another plugin on top of it.