ReadonlyexplicitIndicates whether completion was activated explicitly, or
implicitly by typing. The usual way to respond to this is to
only return completions when either there is part of a
completable entity before the cursor, or explicit is true.
ReadonlyposThe position at which the completion is happening.
ReadonlystateThe editor state that the completion happens in.
Optional ReadonlyviewThe editor view. May be undefined if the context was created
in a situation where there is no such view available, such as
in synchronous updates via
CompletionResult.update
or when called by test code.
Yields true when the query has been aborted. Can be useful in asynchronous queries to avoid doing work that will be ignored.
Allows you to register abort handlers, which will be called when the query is aborted.
By default, running queries will not be aborted for regular
typing or backspacing, on the assumption that they are likely to
return a result with a
validFor field that
allows the result to be used after all. Passing onDocChange: true will cause this query to be aborted for any document
change.
Optionaloptions: { onDocChange: boolean }Get the match of the given expression directly before the cursor.
An instance of this is passed to completion source functions.