Module Autocomplete.ContextSource
An instance of this is passed to completion source functions.
Completion context
include Jv.CONV with type t := Autocomplete.Context.t
val to_jv : Autocomplete.Context.t -> Jv.jvto_jv reveals the JavaScript implementation.
val of_jv : Jv.jv -> Autocomplete.Context.tof_jv hides the JavaScript implementation. Implementations usually do not guarantee type safety.
The editor state that the completion happens in.
The position at which the completion is happening.
Indicates 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.
Get the extent, content, and (if there is a token) type of the token before this.pos.
Get the match of the given expression directly before the cursor.
Yields true when the query has been aborted. Can be useful in asynchronous queries to avoid doing work that will be ignored.