# Text expansion (/docs/haus/rooms/text-expansion)



Type `@@` and get your email address. This room wires up
[espanso](https://espanso.org), which injects keystrokes, so it fires where
macOS's own text replacement doesn't: terminals and many Electron apps.

```nix
haus.snippets = {
  enable = true;
  matches = [ { trigger = "@@"; replace = "ada@example.com"; } ];
};
```

```sh
haus rebuild
```

The table lands in `~/.config/espanso/match/default.yml`. Only the plain
trigger→replace form is exposed here, so dynamic matches (dates, shell output,
forms) go in a hand-written `.yml` beside it, which espanso loads too.

<Callout type="warn" title="Your table replaces the desktop's, it doesn't extend it">
  `matches` is one value, not an accumulator: setting it in your host discards
  whatever the desktop set. Restate both, or keep yours in that hand-written
  `.yml`, which nothing overwrites.
</Callout>

## The grant [#the-grant]

Espanso needs a one-time macOS **Accessibility** grant: System Settings ▸
Privacy & Security ▸ Accessibility ▸ Espanso. Until you give it, nothing
expands. haus installs Espanso as a signed app, so the grant survives reboots
and updates: you click it once.

## Remove it [#remove-it]

`haus.snippets.enable = false;` and rebuild. Revoke the grant and delete any
hand-written `.yml` yourself: haus never wrote those, so it doesn't take them
away.

## Options [#options]

[Every setting, with types and defaults](/docs/haus/reference/options#text-expansion).
