package dap

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. label : string;
    (*

    The label of this completion item. By default this is also the text that is inserted when selecting this completion.

    *)
  2. text : string option;
    (*

    If text is not falsy then it is inserted instead of the label.

    *)
  3. sort_text : string option;
    (*

    A string that should be used when comparing this item with other items. When `falsy` the label is used.

    *)
  4. type_ : Completion_item_type.t option;
    (*

    The item's type. Typically the client uses this information to render the item in the UI with an icon.

    *)
  5. start : int option;
    (*

    This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added. If missing the text is added at the location specified by the CompletionsRequest's 'column' attribute.

    *)
  6. length : int option;
    (*

    This value determines how many characters are overwritten by the completion text. If missing the value 0 is assumed which results in the completion text being inserted.

    *)
  7. selection_start : int option;
    (*

    Determines the start of the new selection after the text has been inserted (or replaced). The start position must in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.

    *)
  8. selection_length : int option;
    (*

    Determines the length of the new selection after the text has been inserted (or replaced). The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.

    *)
}

CompletionItems are the suggestions returned from the CompletionsRequest.

val make : label:string -> ?text:string option -> ?sort_text:string option -> ?type_:Completion_item_type.t option -> ?start:int option -> ?length:int option -> ?selection_start:int option -> ?selection_length:int option -> unit -> t
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
OCaml

Innovation. Community. Security.