GlobalSearchPluginInstance
Unofficial
Plugin instance for global search, providing vault-wide text search functionality.
Import:
import type { GlobalSearchPluginInstance } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface GlobalSearchPluginInstance extends InternalPluginInstance<GlobalSearchPlugin>Extends: InternalPluginInstance<GlobalSearchPlugin>
Properties
| Property | Type | Description | |
|---|---|---|---|
| app | App | Reference to the app. | |
| defaultOn | true | Whether this plugin is enabled by default. | |
| description | string | Human-readable description of this plugin. (Inherited from InternalPluginInstance) | |
| id | string | Unique identifier for this plugin. (Inherited from InternalPluginInstance) | |
| name | string | Human-readable display name of this plugin. (Inherited from InternalPluginInstance) | |
| options | unknown | The plugin's options. | |
| plugin | GlobalSearchPlugin | Reference to the global search plugin registration. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getGlobalSearchQuery() | string | Gets the current global-search query string. | |
| init(app, plugin) | void | Initialize the plugin instance with app and plugin references. (Inherited from InternalPluginInstance) | |
| initLeaf() | void | Ensures the global-search leaf exists in the left sidebar. | |
| onDisable(app, plugin) | void | Called when the plugin is disabled. (Inherited from InternalPluginInstance) | |
| onEditorMenu(menu, editor) | void | Adds a "Search in selection" item to the editor context menu. | |
| onEnable(app, plugin) | Promise<void> | Called when the plugin is enabled. (Inherited from InternalPluginInstance) | |
| onExternalSettingsChange() | Promise<void> | Handles a settings change made externally (e.g. by Sync). | |
| onFileMenu(menu, file, source) | void | Adds a "Search in folder" item to the file context menu. | |
| onUserDisable(app) | void | Called when the user manually disables the plugin. (Inherited from InternalPluginInstance) | |
| onUserEnable(app) | void | Called when the user manually enables the plugin. (Inherited from InternalPluginInstance) | |
| openGlobalSearch(query, active?) | void | Opens the global search with the given query. |
Links to this page: