Skip to content

CommandEditorSuggest.onTextTrigger method

CommandEditorSuggest › onTextTrigger

Decides whether the suggest opens on typed text, outside a command-opened session. Never, by default.

Signature:

onTextTrigger(_cursor: EditorPosition, _editor: Editor, _file: TFile | null): EditorSuggestTriggerInfo | null

Parameters:

ParameterTypeDescription
_cursorEditorPositionThe cursor.
_editorEditorThe editor.
_fileTFile | nullThe file open in the editor.

Returns: EditorSuggestTriggerInfo | null — The trigger info, or null to stay closed.