Skip to main content

Installation

This guide walks you through installing the Lovelace Neovim extension using various plugin managers.

Quick Install (Automated)

Run the automated installer for guided setup:

bash
cd apps/neovim-extension
./install.sh

The installer will:

  • ✅ Verify Neovim 0.9+ is installed
  • ✅ Check for localhost-ctl availability
  • ✅ Detect your plugin manager (lazy.nvim, packer, vim-plug)
  • ✅ Provide installation instructions
  • ✅ Generate example configuration
  • ✅ Guide you through setup

Manual Installation

Step 1: Start Localhost Daemon

Ensure the Localhost daemon is running:

bash
# Start the daemon
localhost-ctl start

# Verify it's running
localhost-ctl status

Step 2: Install Plugin

Using lazy.nvim (recommended)

lua
{
  "lovelace-ai/lovelace.nvim",
  config = function()
    require("lovelace").setup({
      -- Optional configuration (see below)
    })
  end,
}

Using packer.nvim

lua
use {
  "lovelace-ai/lovelace.nvim",
  config = function()
    require("lovelace").setup()
  end
}

Using vim-plug

vim
Plug 'lovelace-ai/lovelace.nvim'

" In your init.vim
lua require("lovelace").setup()

Step 3: Verify Installation

After restarting Neovim, run the health check:

vim
:LovelaceHealth

Expected Output:

✓ Connected to daemon
✓ Socket path: /tmp/lovelace-localhost.sock
✓ Authentication: Authenticated

If you see errors, see Troubleshooting below.

Step 4: Authenticate (First Time Only)

If not already authenticated, run:

vim
:LovelaceAuth

Follow the device authorization flow:

  1. Press c to copy the code
  2. Press o to open browser
  3. Authorize in browser
  4. Window closes automatically when complete

Configuration

Minimal Configuration (Default)

lua
require("lovelace").setup()

This uses sensible defaults that work for most users.

Custom Configuration

lua
require("lovelace").setup({
  -- Daemon connection
  daemon = {
    socket_path = nil,      -- Auto-discover (default: /tmp/lovelace-localhost.sock)
    auto_start = true,      -- Start daemon if not running
    retry_count = 3,        -- Connection retry attempts
  },

  -- UI preferences
  ui = {
    result_window = "split",     -- "split", "vsplit", "float", "tab"
    progress_style = "notify",   -- "notify", "statusline", "both"
    float_width = 0.8,           -- Floating window width (0.0-1.0)
    float_height = 0.8,          -- Floating window height (0.0-1.0)
    float_border = "rounded",    -- Window border style
  },

  -- Task defaults
  tasks = {
    auto_collect_context = true,  -- Include file/selection automatically
    default_workspace = nil,      -- Use current workspace if nil
  },

  -- Keybindings
  keymaps = {
    enabled = true,          -- Enable default keybindings
    prefix = "<leader>l",    -- Key prefix
  },

  -- Logging
  log_level = "info",  -- "debug", "info", "warn", "error"
})

For complete configuration options and detailed explanations, see the Configuration Guide.

Troubleshooting

Daemon Not Connected

Symptom: :LovelaceHealth shows "Disconnected"

Solution:

bash
# Check daemon status
localhost-ctl status

# Start if not running
localhost-ctl start

Authentication Failed

Symptom: :LovelaceAuth shows "Not Authenticated"

Solution:

vim
:LovelaceAuth
" Follow device flow (press 'c' to copy, 'o' to open browser)

Command Not Found

Symptom: E492: Not an editor command: LovelaceTask

Solution:

  1. Ensure plugin is loaded:
    vim
    :echo has('nvim-0.9')  " Should return 1
    
  2. Verify plugin installation:
    vim
    :Lazy  " If using lazy.nvim
    " Check that lovelace.nvim is installed
    
  3. Restart Neovim

Verbose Logging

For debugging issues, enable verbose logging:

lua
require("lovelace").setup({
  log_level = "debug"
})

Then check :messages for detailed information.

For complete troubleshooting guide, see Troubleshooting.

Next Steps