registerCompletionItemProvider method
- Object selector,
- CompletionItemProvider<
CompletionItem> provider, [ - Iterable? triggerCharacters
Register a completion provider.
Multiple providers can be registered for a language. In that case providers are sorted by their {@link languages.matchscore} and groups of equal score are sequentially asked for completion items. The process stops when one or many providers of a group return a result. A failing provider (rejected promise or exception) will not fail the whole operation.
A completion item provider can be associated with a set of triggerCharacters
. When trigger
characters are being typed, completions are requested but only from providers that registered
the typed character. Because of that trigger characters should be different than {@link LanguageConfiguration.wordPatternword characters},
a common trigger character is .
to trigger member completions.
Implementation
_i3.Disposable registerCompletionItemProvider(
_i2.Object selector,
_i3.CompletionItemProvider<_i3.CompletionItem> provider, [
_i2.Iterable<_i2.dynamic>? triggerCharacters,
]) =>
_i4.callMethod(
this,
'registerCompletionItemProvider',
[
selector,
provider,
...?triggerCharacters,
],
);