Updated README, CHANGELOG, and settings descriptions

This commit is contained in:
Simon Cambier
2022-06-26 11:00:23 +02:00
parent 9c3507d885
commit 603dd2b60e
3 changed files with 42 additions and 12 deletions

View File

@@ -1,5 +1,28 @@
# Omnisearch Changelog
## 1.4.x
### New
- Opt-in support for Vim navigation keys: https://github.com/scambier/obsidian-omnisearch/issues/26
- Opt-in display of "short form" links: https://github.com/scambier/obsidian-omnisearch/issues/59
- Opt-in search index serialization, for faster loading times: https://github.com/scambier/obsidian-omnisearch/pull/64 by @mnaoumov
- Opt-out: diacritics can now be ignored
- Added support for `#tag` searches: https://github.com/scambier/obsidian-omnisearch/issues/48
- Added a basic public API for integration with other plugins: https://github.com/scambier/obsidian-omnisearch/issues/22 https://github.com/scambier/obsidian-omnisearch/issues/69
- Use `alt+enter` to inject a link to the currently selected search result item: https://github.com/scambier/obsidian-omnisearch/issues/32
### Improved
- You can now switch between "Vault" and "In-File" modals with `tab`
- Search index updates are now done only when Omnisearch is invoked: https://github.com/scambier/obsidian-omnisearch/issues/57
### Fixed
- Opening a pinned note would open it a second time: https://github.com/scambier/obsidian-omnisearch/issues/51
- Fixed an issue that would index "non-existing notes" multiple times: https://github.com/scambier/obsidian-omnisearch/issues/68
## 1.3.x
### New

View File

@@ -16,11 +16,13 @@ Under the hood, it uses the excellent [MiniSearch](https://github.com/lucaong/mi
- Automatic document scoring using the [BM25 algorithm](https://github.com/lucaong/minisearch/issues/129#issuecomment-1046257399)
- The relevance of a document against a query depends on the number of times the query terms appear in the document, its filename, and its headings
- Keyboard first: you never have to use your mouse
- Instant & highlighted search results
- Workflow similar to "Quick Switcher" plugins
- Resistance to typos
- In-file search to quickly skim multiple results in a single note
- Search filters: expressions in quotes and exclusions
- Respects Obsidian's "Excluded Files" list (results are downranked, not hidden)
- Switch between Vault and In-file search to quickly skim multiple results in a single note
- Supports `"expressions in quotes"` and `-exclusions`
- Directly Insert a `[[link]]` from the search results
- Respects Obsidian's "Excluded Files" list - results are downranked, not hidden
- Optional support for Vim navigation keys (ctrl + j, k, n, p)
## Installation
@@ -43,16 +45,19 @@ If you want to list all the search matches of a single note, you can do so by us
Also accessible through the Command Palette "**_Omnisearch: In-file search_**". This modal searches through the active note's content and lists the matching results. Just press enter to automatically scroll to the right place.
## Public API
A simple API object is available to interact with Omnisearch. If you're using [this package](https://github.com/vanakat/plugin-api), it's accessible through `pluginApi('omnisearch')`. Otherwise, you can access it with `app.plugins.plugins.omnisearch.api`.
> This API is an experimental feature, the `ResultNote` interface may change in the future. The `search()` function returns at most 50 results.
At the time of writing, the API is a work-in-progress feature, but should be stable enough to use.
If you're a plugin developer, you can use [this "plugin-api" package](https://github.com/vanakat/plugin-api), and get the api through `pluginApi('omnisearch')`.
**This API is an experimental feature, the ResultNote interface will likely change. The `search` function returns at most 50 results**
Otherwise, you can access it with `app.plugins.plugins.omnisearch.api`.
```ts
// API:
{
// Returns a promise that will contain the same results than the Vault modal
search: (query: string) => Promise<ResultNote[]>
}
@@ -70,7 +75,9 @@ type SearchMatch = {
}
```
DataviewJS example:
### Dataview Integration
You can use the Omnisearch API directly within the [Dataview](https://blacksmithgu.github.io/obsidian-dataview/) plugin.
~~~js
```dataviewjs
@@ -80,7 +87,7 @@ dv.table(['File', 'Score'], arr.map(o => [dv.fileLink(o.path), Math.round(o.scor
```
~~~
## Customization
## CSS Customization
There are several CSS classes you can use to customize the appearance of Omnisearch.

View File

@@ -54,7 +54,7 @@ export class SettingsTab extends PluginSettingTab {
new Setting(containerEl)
.setName('Ignore diacritics')
.setDesc(
'EXPERIMENTAL - Normalize diacritics in search terms. Words like "brûlée" or "žluťoučký" will be indexed as "brulee" and "zlutoucky". Needs a restart to take effect.',
'Normalize diacritics in search terms. Words like "brûlée" or "žluťoučký" will be indexed as "brulee" and "zlutoucky". Needs a restart to take effect.',
)
.addToggle(toggle =>
toggle.setValue(settings.ignoreDiacritics).onChange(async v => {
@@ -66,7 +66,7 @@ export class SettingsTab extends PluginSettingTab {
new Setting(containerEl)
.setName('Store index in file')
.setDesc(
'EXPERIMENTAL - index is store on disk, instead of being rebuilt on every startup.',
'Index is stored on disk, instead of being rebuilt at every startup.',
)
.addToggle(toggle =>
toggle.setValue(settings.storeIndexInFile).onChange(async v => {