Skip to content

CommandPalettePluginInstance

Unofficial

Plugin instance for the command palette, providing the fuzzy command search modal.

Import:

import type { CommandPalettePluginInstance } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface CommandPalettePluginInstance extends InternalPluginInstance<CommandPalettePlugin>

Extends: InternalPluginInstance<CommandPalettePlugin>

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)
modalCommandPaletteModalThe command palette fuzzy suggest modal.
namestringHuman-readable display name of this plugin.
(Inherited from InternalPluginInstance)
optionsCommandPaletteOptionsConfiguration options for the command palette.
pluginCommandPalettePluginReference to the command palette plugin registration.
recentCommandsstring[]List of recently used command IDs.

Methods

MethodReturnsDescription
getCommands()Command[]Get the list of available commands for the palette.
init(app, plugin)voidInitialize the plugin instance with app and plugin references.
(Inherited from InternalPluginInstance)
onDisable(app, plugin)voidCalled when the plugin is disabled.
(Inherited from InternalPluginInstance)
onEnable(app, plugin)Promise<void>Called when the plugin is enabled.
(Inherited from InternalPluginInstance)
onExternalSettingsChange()Promise<void>Handle external settings file changes and reload configuration.
onOpen()booleanCalled when the command palette is opened.
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)
openCallback()booleanCallback invoked to open the command palette.
saveSettings(plugin)voidSave the command palette settings.

Links to this page: