# `Minga.Keymap.Defaults`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/keymap/defaults.ex#L1)

Doom Emacs-style default leader keybindings for Minga.

All bindings are rooted at the **SPC** (space) leader key in Normal mode.
Group prefix nodes are labelled with `+group` descriptions so that the
which-key popup can display them meaningfully.

## Key groups

| Prefix    | Group       |
|-----------|-------------|
| `SPC f`   | +file       |
| `SPC b`   | +buffer     |
| `SPC w`   | +window     |
| `SPC s`   | +search     |
| `SPC c`   | +code       |
| `SPC g`   | +git        |
| `SPC o`   | +open       |
| `SPC a`   | +ai         |
| `SPC t`   | +toggle     |
| `SPC p`   | +project    |
| `SPC q`   | +quit       |
| `SPC h`   | +help       |
| `SPC m`   | +filetype   |

# `filetype_binding`

```elixir
@type filetype_binding() ::
  {atom(), [Minga.Keymap.Bindings.key()], atom(), String.t()}
```

# `all_bindings`

```elixir
@spec all_bindings() :: [{[Minga.Keymap.Bindings.key()], atom(), String.t()}]
```

Returns all leader bindings as a flat list of `{key_sequence, command, description}` tuples.

# `filetype_bindings`

```elixir
@spec filetype_bindings() :: [filetype_binding()]
```

Returns filetype-scoped bindings for the `SPC m` major mode prefix.

Each entry is `{filetype, key_sequence, command, description}` where
key_sequence is relative to the `SPC m` prefix.

These bindings are grouped by filetype and built into per-filetype
tries at startup by `Minga.Keymap.Active`.

# `filetype_group_prefixes`

```elixir
@spec filetype_group_prefixes() :: [{[Minga.Keymap.Bindings.key()], String.t()}]
```

Returns group prefixes for filetype-scoped bindings.

These add labels to intermediate keys so which-key shows them
(e.g., `t` → `+test` under `SPC m`).

# `leader_key`

```elixir
@spec leader_key() :: Minga.Keymap.Bindings.key()
```

Returns the leader key as a `t:Minga.Keymap.Bindings.key/0` tuple (SPC = `{32, 0}`).

# `leader_trie`

```elixir
@spec leader_trie() :: Minga.Keymap.Bindings.node_t()
```

Returns a trie whose root is the SPC leader key's subtrie.

The returned node can be passed directly to `Minga.Keymap.Bindings.lookup/2` for
subsequent keys in the leader sequence.

# `normal_bindings`

```elixir
@spec normal_bindings() :: %{
  required(Minga.Keymap.Bindings.key()) =&gt; {atom(), String.t()}
}
```

Returns a map of Normal mode key bindings: `{codepoint, modifiers} => {command, description}`.

These are the hardcoded bindings from `Minga.Mode.Normal.handle_key/2`,
maintained as a static data structure for introspection (describe-key).

---

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