Module Autocomplete.CompletionSource

Represents individual completions.

Sourcetype t

Completion

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 : label:string -> ?detail:string -> ?info:string -> ?apply:t -> ?type_:string -> ?boost:int -> unit -> t

Creates a completion.

  • parameter label

    The label to show in the completion picker.

  • parameter detail

    An optional short piece of information to show after the label.

  • parameter info

    Additional info to show when the completion is selected.

  • parameter apply

    (todo) How to apply the completion.

  • parameter type

    The type of the completion. This is used to pick an icon to show for the completion.

  • parameter boost

See the reference for additional information.