Skip to content

Commit

Permalink
explain how to produce suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Dec 17, 2023
1 parent 20dfed4 commit cc57b4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,14 @@ The parser may implement the `suggestions` method to produce suggestions.
These suggestions will be used to provide suggestions for the component using the parser,
unless the component is created using a custom suggestion provider.

Parsers implement `SuggestionProviderHolder` which means that they can return a suggestion provider by overriding
the `suggestionProvider` method.
However, the recommended way of providing suggestions is by implementing one of the suggestion provider
interfaces (`SuggestionProvider`, `SuggestionProvider.Strings`,
`BlockingSuggestionProvider` or `BlockingSuggestionProvider.Strings`).
If the parser implements a suggestion provider interface it does not need to override the `suggestionProvider`
method, as it'll return `this` by default.

## Extra

### Confirmations
Expand Down

0 comments on commit cc57b4b

Please sign in to comment.