CommandEditorSuggest.onTrigger method
CommandEditorSuggest › onTrigger
Decides whether the suggest opens. While a command-opened session lasts, the query is the text from where it was opened to the cursor; otherwise CommandEditorSuggest.onTextTrigger decides.Signature:
onTrigger(cursor: EditorPosition, editor: Editor, file: TFile | null): EditorSuggestTriggerInfo | nullParameters:
| Parameter | Type | Description |
|---|---|---|
| cursor | EditorPosition | The cursor. |
| editor | Editor | The editor. |
| file | TFile | null | The file open in the editor. |
Returns: EditorSuggestTriggerInfo | null — The trigger info, or null to stay closed.