scambier / obsidian-omnisearch

A search engine that "just works" for Obsidian. Supports OCR and PDF indexing.
GNU General Public License v3.0
1.19k stars 60 forks source link

[Feature request] Replace search icon with Omnisearch #200

Closed NAL100 closed 1 year ago

NAL100 commented 1 year ago

Is your feature request related to a problem? Please describe. Two search icons, just want one.

Describe the solution you'd like For the Omnisearch icon to be the only search icon, and to be in the header area of Obsidian.

Describe alternatives you've considered I tried to look over all of the settings but couldn't find a way to do this.

scambier commented 1 year ago

Not sure what you're asking me to do with this request, IMO it's not up to Omnisearch to disable the default search icon 🤷‍♂️

NAL100 commented 1 year ago

Not sure what you're asking me to do with this request, IMO it's not up to Omnisearch to disable the default search icon 🤷‍♂️

If it's not possible that's fine, I guess. I know you have limitations as a plugin developer however this might be something to put forward to the Obsidian devs so there can be a way to toggle the other search icon off. It's just confusing to have two search icons and also I'd prefer to see the results in a sidebar like regular search.

scambier commented 1 year ago

also I'd prefer to see the results in a sidebar like regular search.

I think this fork was aiming to do that https://github.com/gwynm/obsidian-omnisearch

I haven't tried it, but it should be installable through BRAT.

gavinmn commented 1 year ago

I was going to +1 the idea of an nvALT style search experience powered by Omnisearch but totally understand if that's not what you see as in the scope of the core project. That fork seems to be unmaintained and broken currently but maybe it's the path forward for something like this.

NAL100 commented 1 year ago

Yes I think having the ability to put it into a sidebar pane would be great. I would go with the fork but I kind of like staying with currently maintained plugins.

I had another thought about this - I started using make.md and it lets you hide the "sidebar" tabs which include the default search button (so that solves part of the issue) but then it also has a search they are using called 'blink' - I like Omnisearch's results and customizability way better so it would be great to figure out a way to have Omnisearch pop up when I click that button instead of their default search.

scambier commented 1 year ago

nvALT was originally an inspiration for Omnisearch. I understand why one would want it on the sidebar and not as a modal, but yeah, not going to happen anytime soon :/

If anyone wants to make a PR to add this as an option, go for it. Omnisearch also has a public API, so it's possible to write your own plugin with Omnisearch as a dependency.

gavinmn commented 1 year ago

Omnisearch also has a public API, so it's possible to write your own plugin with Omnisearch as a dependency.

👀👀 Didn't realize this! I'll see if I have the skills to give this a shot. If you have any tips or suggestions I'm all ears.

scambier commented 1 year ago

If you have any tips or suggestions I'm all ears.

For Obisidian plugin development, https://marcus.se.net/obsidian-plugin-docs/ is a good starting point. The official Discord also has an active community of developers. For Omnisearch, the API is very high level so it's basically const results = await omnisearch.search('your query') for a vault search :)

gavinmn commented 1 year ago

Sorry for the basic question, but how would I import Omnisearch to get access to the API?

scambier commented 1 year ago

Sorry that wasn't clear: Omnisearch, the plugin itself, is used as a dependency. It just needs to be installed on Obsidian, and you can access it with the global variable omnisearch. There's isn't a npm package.