Module Autocomplete.ResultSource

Objects returned by completion sources.

Sourcetype t

Completion result

include Jv.CONV with type t := t
val to_jv : t -> Jv.jv

to_jv reveals the JavaScript implementation.

val of_jv : Jv.jv -> t

of_jv hides the JavaScript implementation. Implementations usually do not guarantee type safety.

Sourceval create : from:int -> ?to_:int -> options:Completion.t list -> ?span:RegExp.t -> ?filter:bool -> unit -> t

Creating a new completion result (see the docs).

  • parameter from

    The start of the range that is being completed.

  • parameter to_

    The end of the range that is being completed. Defaults to the main cursor position.

  • parameter options

    The completions returned.

  • parameter span

    When given, further input that causes the part of the document between from and to_ to match this regular expression will not query the completion source again

  • parameter filter

    By default, the library filters and scores completions. Set filter to false to disable this, and cause your completions to all be included, in the order they were given.