Minga.Language.BlockPair (Minga v0.1.0)

Copy Markdown View Source

Language-owned block auto-close metadata.

Tree-sitter tells Minga where syntax scopes and structural matches are. This metadata tells Insert mode which language keywords may be auto-closed when the user presses Enter after an opener.

Summary

Types

How the opener should be matched against the current line.

t()

Functions

Returns block auto-close metadata for a language name.

Creates a block auto-close metadata entry.

Types

match()

@type match() :: :line_head | :line_suffix

How the opener should be matched against the current line.

t()

@type t() :: %Minga.Language.BlockPair{
  closer: String.t(),
  match: match(),
  opener: String.t()
}

Functions

for_language(arg1)

@spec for_language(atom()) :: [t()]

Returns block auto-close metadata for a language name.

new(opener, closer, match)

@spec new(String.t(), String.t(), match()) :: t()

Creates a block auto-close metadata entry.