Composer.LSP.Complete (composer v0.2.0)

Copy Markdown View Source

Completion items for a context from Composer.LSP.Cursor.context/3.

In a steps: literal: every step id, every recipe id, and the current recipe's alias prefixes (with the ids they reach). In {:use, ": recipe ids only. Items are built from the entries of the completion index (Composer.Index), as %{label, kind, detail, range} where kind is :step, :recipe or :alias and range is the literal's contents, which the item replaces.

Summary

Functions

The items for context, from entries ({kind, id, text}) and the recipe's aliases (%{"lab" => "composer_lab"}).

Types

item()

@type item() :: %{
  label: String.t(),
  kind: :step | :recipe | :alias,
  detail: String.t(),
  range: Composer.Lint.Diagnostic.range()
}

Functions

items(arg1, entries, aliases)

@spec items(
  {:steps | :use, String.t(), Composer.Lint.Diagnostic.range()} | nil,
  list(),
  map()
) :: [
  item()
]

The items for context, from entries ({kind, id, text}) and the recipe's aliases (%{"lab" => "composer_lab"}).