Skip to content

FileSuggestModal.getSuggestions method

FileSuggestModal › getSuggestions

Unofficial

Gets the suggestions for a query.

The query is trimmed first. An empty query returns the recent files that are offered and not excluded by the user, with a null match. Otherwise every offered vault file is fuzzy-matched by its path (without the .md extension), and, when FileSuggestModal.shouldShowAlias is true, by each of its frontmatter aliases; a file excluded by the user is kept but its score is lowered by 10. Unresolved link text and bookmarks are added when enabled, and the result is sorted by descending score.

Signature:

getSuggestions(query: string): FileSuggestModalSuggestion[]

Parameters:

ParameterTypeDescription
querystringThe query.

Returns: FileSuggestModalSuggestion[] — The suggestions.