# `Markup.Languages`
[🔗](https://github.com/paradox460/markup/blob/markup-v0.1.0/core/lib/markup/languages.ex#L1)

Discovers installed `Markup.Language` modules.

A language package lists its modules under `:markup_languages` in its
application env (see `Markup.Language`). `config :markup, languages: [...]`
adds modules explicitly. The result is not cached, because loaded
applications change while a project compiles.

# `all`

```elixir
@spec all() :: [module()]
```

Every installed language module, deduplicated and sorted by id.

# `fetch`

```elixir
@spec fetch(atom()) :: {:ok, module()} | {:error, Markup.Error.t()}
```

Finds an installed language by id or module.

# `resolve`

```elixir
@spec resolve(keyword(), Markup.Document.t() | nil) :: module()
```

Resolves the language for `opts` and an optional document. Precedence:
`opts[:language]`, `doc.language`, `config :markup, :default_language`,
then the only installed language. Raises `Markup.Error` otherwise.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
