MingaEditor.SignatureHelp (Minga v0.1.0)

Copy Markdown View Source

Immutable lifecycle value for LSP signature help.

The value owns response parsing, replacement, dismissal, and overload selection. MingaEditor.SignatureHelp.Presenter owns geometry.

Summary

Types

A parsed parameter.

A parsed signature.

t()

Signature-help lifecycle value.

Functions

Dismisses signature help.

Creates signature-help state from an LSP SignatureHelp response.

Cycles to the next signature overload.

Cycles to the previous signature overload.

Replaces any prior signature-help value with a fresh response value.

Types

parameter()

@type parameter() :: %{label: String.t(), documentation: String.t()}

A parsed parameter.

signature()

@type signature() :: %{
  label: String.t(),
  documentation: String.t(),
  parameters: [parameter()]
}

A parsed signature.

t()

@type t() :: %MingaEditor.SignatureHelp{
  active_parameter: non_neg_integer(),
  active_signature: non_neg_integer(),
  anchor_col: non_neg_integer(),
  anchor_row: non_neg_integer(),
  signatures: [signature()]
}

Signature-help lifecycle value.

Functions

dismiss(arg1)

@spec dismiss(t() | nil) :: nil

Dismisses signature help.

from_response(response, cursor_row, cursor_col)

@spec from_response(map(), non_neg_integer(), non_neg_integer()) :: t() | nil

Creates signature-help state from an LSP SignatureHelp response.

next_signature(help)

@spec next_signature(t()) :: t()

Cycles to the next signature overload.

prev_signature(help)

@spec prev_signature(t()) :: t()

Cycles to the previous signature overload.

replace(arg1, signature_help)

@spec replace(t() | nil, t()) :: t()

Replaces any prior signature-help value with a fresh response value.