Skip to main content

Overview

Gentleman.Dots includes six AI assistants, but only one should be enabled at a time to avoid keybinding conflicts and unexpected behavior. By default, OpenCode is enabled with the Gentleman agent.
Critical: Only enable ONE AI plugin at a time. Multiple AI plugins can cause:
  • Conflicting keybindings
  • Unexpected behavior
  • Performance issues
  • Difficulty troubleshooting

Plugin Status Management

All AI plugin states are managed in a single file:
~/.config/nvim/lua/plugins/disabled.lua
This file controls which plugins are loaded when Neovim starts.

Current Default State

The default configuration:
return {
  {
    "yetone/avante.nvim",
    enabled = false,  -- Disabled
  },
  {
    "CopilotC-Nvim/CopilotChat.nvim",
    enabled = false,  -- Disabled
  },
  {
    "NickvanDyke/opencode.nvim",
    enabled = true,   -- ✅ ENABLED
  },
  {
    "olimorris/codecompanion.nvim",
    enabled = false,  -- Disabled
  },
  {
    "coder/claudecode.nvim",
    enabled = false,  -- Disabled
  },
  -- Note: Gemini is not in disabled.lua - managed in its own config
}
OpenCode is the only AI plugin enabled by default. This provides the full Gentleman experience.

How to Switch Plugins

1

Open the Configuration File

Open the disabled plugins configuration:
nvim ~/.config/nvim/lua/plugins/disabled.lua
2

Disable Current Plugin

Find the currently enabled plugin (usually OpenCode) and set it to false:
{
  "NickvanDyke/opencode.nvim",
  enabled = false,  -- Changed from true
},
3

Enable New Plugin

Find the plugin you want to enable and set it to true:
{
  "yetone/avante.nvim",
  enabled = true,   -- Changed from false
},
4

Save and Restart Neovim

Save the file (:w) and restart Neovim completely:
# Exit Neovim
:qa

# Restart Neovim
nvim
5

Verify Plugin Loaded

Check that the new plugin loaded successfully:
:Lazy
Look for your enabled plugin in the list (should show as loaded).

Switching Examples

Use case: You want visual diff management and cursor planning mode.

Configuration Changes

{
  "NickvanDyke/opencode.nvim",
  enabled = false,  -- Disable OpenCode
},
{
  "yetone/avante.nvim",
  enabled = true,   -- Enable Avante
},

After Restart

  • OpenCode keybindings (<leader>a*) will be inactive
  • Avante sidebar will be available on the left side
  • Built-in Gentleman system prompt is included

Key Avante Features

  • Visual diff accept/reject
  • Cursor planning mode
  • Sidebar layout (30% width, left side)
  • Copilot integration with Claude Sonnet 4

Comparison Table

PluginDefaultKeybind PrefixLayoutSpecial Requirements
OpenCode✅ Enabled<leader>aLeft sidebarOpenCode CLI
AvanteDisabledVariesLeft sidebar (30%)Build from source
CopilotChatDisabledChat commandsHorizontalGitHub Copilot subscription
CodeCompanionDisabled<leader>aLeft chatNone (multiple providers)
Claude CodeDisabled<leader>aLeft terminal (30%)Claude Code CLI
GeminiDisabledVia CLIN/AGemini CLI

Keybinding Conflicts

Many plugins use similar keybinding prefixes. Here’s what to watch for:
<leader>a Prefix ConflictsOpenCode, CodeCompanion, and Claude Code all use <leader>a as their primary prefix. Enabling multiple will cause conflicts.

Keybinding Overview

PluginToggleChatActionsOther
OpenCode<leader>aa<leader>aiBuilt-in prompts<leader>as (select)
AvanteCustomSidebarVisual diffsAuto-opens
CopilotChatN/A:CopilotChatN/AVarious commands
CodeCompanionN/A<leader>ac<leader>aa<leader>ae (explain)
Claude Code<leader>acN/A<leader>aa (accept)<leader>ar (resume)
GeminiVia CLIVia CLIVia CLIExternal tool
If you frequently switch between plugins, consider customizing keybindings in each plugin’s config file to avoid relearning shortcuts.

Verifying the Switch

1

Check Loaded Plugins

After restarting Neovim, verify with Lazy:
:Lazy
Look for your enabled plugin. It should show as loaded (not lazy-loaded or disabled).
2

Test Keybindings

Try a keybinding specific to the new plugin:
  • Avante: Visual select code, check for Avante sidebar
  • CopilotChat: Run :CopilotChat
  • CodeCompanion: Run :CodeCompanion
  • Claude Code: Press <leader>ac
  • Gemini: Run gemini-cli in terminal
3

Verify Old Plugin Disabled

Ensure the previous plugin isn’t loaded:
:Lazy
The disabled plugin should show as not loaded.

Switching Back to OpenCode

To return to the default Gentleman experience:
-- In ~/.config/nvim/lua/plugins/disabled.lua
return {
  {
    "yetone/avante.nvim",
    enabled = false,
  },
  {
    "CopilotC-Nvim/CopilotChat.nvim",
    enabled = false,
  },
  {
    "NickvanDyke/opencode.nvim",
    enabled = true,   -- ✅ Back to default
  },
  {
    "olimorris/codecompanion.nvim",
    enabled = false,
  },
  {
    "coder/claudecode.nvim",
    enabled = false,
  },
}
Restart Neovim. OpenCode will be available with the Gentleman agent.

CLI Tool Requirements

Some plugins require external CLI tools:

OpenCode

# Install OpenCode CLI
curl -fsSL https://opencode.ai/install | bash

# Verify installation
which opencode

# Modern CLI tools (used by Gentleman agent)
brew install bat ripgrep fd sd eza
# Install Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash

# Verify installation
which claudecode
# Install Gemini CLI
brew install gemini-cli

# Verify installation
which gemini
Requires GitHub Copilot subscription.No additional CLI tools needed, but you must have:
  • Active GitHub Copilot subscription
  • Authenticated Copilot in Neovim
No external CLI required, but may need to build from source:
# On Linux/Mac (automatic)
# The plugin builds automatically with `make`

# On Windows
# Uses PowerShell Build.ps1 script
No external CLI required. Uses built-in adapters for various providers:
  • Copilot (requires GitHub subscription)
  • GPT-4o/4.1 (requires OpenAI API key)
  • Gemini 2.5 Pro (requires Google API key)

Troubleshooting

Symptoms: New plugin isn’t active after restart.Solutions:
  1. Verify you set enabled = true in disabled.lua
  2. Check plugin-specific config files (some have their own enabled flag)
  3. Run :Lazy sync to ensure plugins are installed
  4. Completely close and restart Neovim (not just :source)
  5. Check for errors: :messages
Symptoms: Keybindings from multiple plugins responding.Solutions:
  1. Verify only ONE plugin has enabled = true in disabled.lua
  2. Check plugin-specific configs (some plugins aren’t in disabled.lua)
  3. Restart Neovim completely
  4. Use :Lazy to confirm only one AI plugin is loaded
Symptoms: New plugin’s keybindings don’t respond.Solutions:
  1. Verify plugin is loaded: :Lazy
  2. Check for conflicting mappings: :map <leader>a
  3. Review plugin’s config file for keybinding definitions
  4. Some plugins require triggering (e.g., :CopilotChat first)
  5. Check :messages for errors
Symptoms: Errors about missing opencode, claudecode, or gemini.Solutions:Install the required CLI tool:
# For OpenCode
curl -fsSL https://opencode.ai/install | bash

# For Claude Code
curl -fsSL https://claude.ai/install.sh | bash

# For Gemini
brew install gemini-cli
Then restart Neovim.
Symptoms: Avante fails to build on installation.Solutions:
  1. Ensure build tools are installed:
    # Linux
    sudo apt-get install build-essential
    
    # Mac
    xcode-select --install
    
  2. Try manual build:
    cd ~/.local/share/nvim/lazy/avante.nvim
    make
    
  3. Check Avante documentation for platform-specific requirements

Best Practices

Test Before Committing

When switching plugins, test thoroughly before relying on it for production work.

Document Your Choice

Keep a note of which plugin you’re using and why, especially if you switch frequently.

Learn One Deeply

Rather than switching often, pick one AI plugin and learn it deeply for maximum productivity.

Backup Configs

Keep a backup of disabled.lua with different combinations if you experiment frequently.
Use CaseRecommended PluginWhy
Full Gentleman experienceOpenCodeCustom agent, modern CLI tools, MCP integration
Visual diff managementAvanteCursor planning, visual accept/reject
GitHub Copilot userCopilotChatOfficial integration, 15+ prompts
Multi-provider flexibilityCodeCompanionSupports Copilot, OpenAI, Gemini
Direct Claude accessClaude CodeNative Claude CLI integration
Google Gemini userGeminiSimple Gemini CLI integration
Start with OpenCode (default) to experience the Gentleman approach. Switch to others if you have specific provider requirements or prefer different interaction styles.

Next Steps

AI Overview

Review all available AI integration options

OpenCode Setup

Deep dive into OpenCode configuration

Gentleman Agent

Learn about the Gentleman agent philosophy

Build docs developers (and LLMs) love