Skip to main content

:LovelaceAuth

Pair (trust) this Neovim client with your Lovelace Lattice daemon.

Command Signature

vim
:LovelaceAuth

Alias: :LAuth

Description

The Neovim extension uses the Lattice daemon pairing APIs (pairing.*) instead of an OAuth device code flow.

What it does:

  • Shows current pairing/trust status (pairing.status)
  • If the device is not set up, starts pairing (pairing.initiate) and shows a 4-word code
  • Lets you refresh the code (pairing.getCode) and cancel a pending request (pairing.cancel)

When to use:

  • First-time setup after installation
  • When :LovelaceHealth shows "Device not set up"
  • When you want to confirm trust status (DID / trust level)

Output Format

When Already Set Up

## Pairing / Trust

✓ Device is set up
  DID: did:key:...
  Trust: platform_verified
  Pending requests: 0

When Pairing Is Required

# Pair This Neovim Client

Pairing code: apple-banana-cherry-date
Expires: 2026-02-08T21:15:00Z
Request ID: 9f5b...

Keybindings:
  c - Copy pairing code
  r - Refresh code
  x - Cancel request
  q - Close

Pairing Keybindings

While the pairing window is open:

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

Pairing Walkthrough

  1. Run:

    vim
    :LovelaceAuth
    
  2. Press c to copy the pairing code.

  3. Approve the code on a trusted device (example):

    bash
    ada pair approve apple-banana-cherry-date
    
  4. Back in Neovim, press r to refresh (or re-run :LovelaceHealth).

Device Identity Persistence

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

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

Deleting this file will cause Neovim to generate a new device identity the next time you pair.

Troubleshooting

Daemon Not Running

If :LovelaceAuth fails to connect:

bash
lattice-ctl daemon start
lattice-ctl daemon status

Then re-run:

vim
:LovelaceHealth

Pairing Code Expired

Pairing requests expire after a short time window (typically 5 minutes). If the code expires:

vim
:LovelaceAuth

Generate a new code and approve it again.

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

Related Commands

CommandPurpose
:LovelaceHealthVerify connectivity and pairing status
:LovelaceTasksList tasks
:LovelaceSessionShow workspace/session info