Skip to main content

Pairing & Trust

The Lovelace Neovim extension uses the Lattice daemon pairing flow (pairing.*) to establish trust for this editor client.

This is a local-first workflow: Neovim talks to the daemon over a Unix socket, and trust is established via a short pairing code you approve on an already-trusted device.

Check Pairing Status

Run:

vim
:LovelaceHealth

If the device is not set up, you'll see:

## Pairing / Trust

✗ Device not set up
To pair this Neovim client:
  :LovelaceAuth

Pair This Neovim Client

Start pairing:

vim
:LovelaceAuth

The pairing window shows a 4-word code (BIP39-style), an expiration time, and keybindings.

Keybindings

KeyActionDescription
cCopy codeCopy the pairing code
rRefreshRefresh the pairing code (if supported)
xCancelCancel the pending request
qCloseClose the window

Approve the Code

On a trusted device, approve the code (example):

bash
ada pair approve apple-banana-cherry-date

Back in Neovim, press r to refresh or re-run:

vim
:LovelaceHealth

Pairing Code Expiration

Pairing codes expire quickly (typically ~5 minutes). If a code expires, generate a new one:

vim
:LovelaceAuth

Device Identity Persistence

The extension persists a device DID under Neovim's data directory:

  • stdpath("data")/lovelace/device.json

If you delete this file, Neovim will generate a new device identity the next time you pair.

Troubleshooting

Daemon Not Running

Start the daemon:

bash
lattice-ctl daemon start
lattice-ctl daemon status

Then verify connectivity:

vim
:LovelaceHealth

Rate Limited

If pairing initiation is rate limited, wait briefly (often ~30 seconds) and try again.

Socket Path Issues

If your daemon uses a non-default socket path, configure either:

  • Plugin config: daemon.socket_path = "/path/to/daemon.sock"
  • Environment: LOCALHOST_SOCKET=/path/to/daemon.sock

Next Steps