Skip to content

GlobalSearchPluginInstance

Unofficial

Plugin instance for global search, providing vault-wide text search functionality.

Import:

import type { GlobalSearchPluginInstance } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface GlobalSearchPluginInstance extends InternalPluginInstance<GlobalSearchPlugin>

Extends: InternalPluginInstance<GlobalSearchPlugin>

Properties

PropertyTypeDescription
appAppReference to the app.
defaultOntrueWhether this plugin is enabled by default.
descriptionstringHuman-readable description of this plugin.
(Inherited from InternalPluginInstance)
idstringUnique identifier for this plugin.
(Inherited from InternalPluginInstance)
namestringHuman-readable display name of this plugin.
(Inherited from InternalPluginInstance)
optionsunknownThe plugin's options.
pluginGlobalSearchPluginReference to the global search plugin registration.

Methods

MethodReturnsDescription
getGlobalSearchQuery()stringGets the current global-search query string.
init(app, plugin)voidInitialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
initLeaf()voidEnsures the global-search leaf exists in the left sidebar.
onDisable(app, plugin)voidCalled when the plugin is disabled.
(Inherited from InternalPluginInstance)
onEditorMenu(menu, editor)voidAdds 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)voidAdds a "Search in folder" item to the file context menu.
onUserDisable(app)voidCalled when the user manually disables the plugin.
(Inherited from InternalPluginInstance)
onUserEnable(app)voidCalled when the user manually enables the plugin.
(Inherited from InternalPluginInstance)
openGlobalSearch(query, active?)voidOpens the global search with the given query.

Links to this page: