Composer.LSP.Definition (composer v0.2.0)

Copy Markdown View Source

Goto-definition targets and hex: document links.

  • a step: its source file, at its use Composer.Step line (a cookbook under deps/ included)
  • a recipe: its name key in its group file
  • an alias: its entry in aliases:, or in the top-level binding that aliases: names
  • a hex: reference: a document link to its HexDocs

Summary

Functions

The HexDocs URL of a hex: reference, or nil.

The hex: references in text as {range, url}, from the locator when the text parses, else by scanning each line's string literals.

The target of a Composer.LSP.Lookup result, or nil. For an alias, buffer is %{text, path, recipe}, the buffer the cursor is in.

Types

target()

@type target() :: {Path.t(), Composer.Lint.Diagnostic.range()}

Functions

hexdocs(string)

@spec hexdocs(String.t()) :: String.t() | nil

The HexDocs URL of a hex: reference, or nil.

links(text, path)

@spec links(String.t(), Path.t()) :: [{Composer.Lint.Diagnostic.range(), String.t()}]

The hex: references in text as {range, url}, from the locator when the text parses, else by scanning each line's string literals.

target(arg1, cookbooks, arg3)

@spec target(Composer.LSP.Lookup.result(), [Composer.Cookbook.t()], map()) ::
  target() | nil

The target of a Composer.LSP.Lookup result, or nil. For an alias, buffer is %{text, path, recipe}, the buffer the cursor is in.