Troubleshooting
This page focuses on the most common issues when connecting the Neovim extension to the Lattice daemon.
Quick Checks
-
In Neovim:
vim:LovelaceHealth -
In a shell:
bashlattice-ctl daemon status ls -la ~/.lovelace/lattice/daemon.sock
If :LovelaceHealth is green and pairing/trust is set up, most issues are resolved.
Plugin Loading Issues
Commands Not Found
Symptom: E492: Not an editor command: LovelaceHealth
Fixes:
- Ensure the plugin is installed and loaded by your plugin manager
- Restart Neovim after installation
- Check for Lua errors:
vim
:messages
Connection Problems
Socket Not Found
Symptom: :LovelaceHealth shows "Not connected to daemon"
Fixes:
-
Start the daemon:
bashlattice-ctl daemon start lattice-ctl daemon status -
Verify the default socket path exists:
bashls -la ~/.lovelace/lattice/daemon.sock -
If you use a custom socket, set either:
- Plugin config:
daemon.socket_path = "/path/to/daemon.sock" - Environment:
LATTICE_SOCKET=/path/to/daemon.sock
- Plugin config:
The plugin discovers sockets in this order:
daemon.socket_pathLATTICE_SOCKETLATTICE_SOCKET_PATHLOVELACE_SOCKET_PATH~/.lovelace/lattice/daemon.sock/tmp/lovelace-daemon.sock
Connection Refused
Symptom: Socket exists, but connection fails
Fixes:
- The daemon process may be stopped. Start it:
bash
lattice-ctl daemon start - If you need a restart:
bash
lattice-ctl daemon stop lattice-ctl daemon start
Permission Denied
Symptom: Permission errors when connecting to the socket
Fixes:
ls -la ~/.lovelace/lattice/daemon.sock
lattice-ctl daemon stop
lattice-ctl daemon start
Pairing / Trust Issues
Device Not Set Up
Symptom: :LovelaceHealth shows:
## Pairing / Trust
✗ Device not set up
Fix:
:LovelaceAuth
Then:
- Press
cto copy the pairing code - Approve it on a trusted device (example):
bash
ada pair approve apple-banana-cherry-date - Press
rto refresh (or re-run:LovelaceHealth)
Pairing Code Expired
Pairing codes expire quickly (typically ~5 minutes). Generate a new code:
:LovelaceAuth
Rate Limited
If pairing initiation is rate limited, wait briefly (often ~30 seconds) and try again.
Task Issues
Task Submission Failed
Fixes:
- Verify connectivity:
vim
:LovelaceHealth - Verify pairing/trust:
vim
:LovelaceAuth - Check details:
vim
:messages
Task Stuck in Queued
Fixes:
- Check agents:
vim
:LovelaceAgents - Check the task list:
vim
:LovelaceTasks - Restart daemon if agents are not running:
bash
lattice-ctl daemon stop lattice-ctl daemon start
Cancel Doesn’t Work
If :LovelaceCancel fails, ensure you are running a daemon version that supports cancelTask. Upgrade the daemon and retry.
Workspace Issues
Wrong Workspace Detected
Use:
:LovelaceSession
If the workspace is wrong, :cd into the correct project root and re-run :LovelaceSession.
You can also pin a workspace ID via config:
require("lovelace").setup({
tasks = {
default_workspace = "ws_..."
}
})
Getting Logs
To view daemon logs:
# systemd
journalctl -u lattice-daemon -f
# or run daemon in foreground for debugging
lattice-ctl daemon start --foreground