1. Conduid
  2. Developer Tools
  3. Nvim Gemini Companion
MCP server · Developer Tools

Nvim Gemini Companion

A Neovim plugin to integrate Gemini CLI well (+ Qwen-code now)

63Good

Scored 4 days ago · breakdown

About Nvim Gemini Companion

Nvim Gemini Companion is an MCP server published by gutsavgupta in the Developer Tools category: a Neovim plugin to integrate Gemini CLI well (+ Qwen-code now). It has been installed 0 times through Conduid.

The repository has 75 stars and 7 forks, with the last commit 7 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx nvim-gemini-companion

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Nvim Gemini Companion

Powered by Claude · Grounded in docs

I know everything about Nvim Gemini Companion. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.7.1v0.7.1
v0.7v0.7
v0.6v0.6
v0.5v0.5

README

nvim-gemini-companion

🚀 Now with Dual Agent Support (Gemini & Qwen)! 🤖

nvim-gemini-companion brings the power of AI agents like Gemini and Qwen directly into your Neovim workflow. 🌟 Enjoy seamless diff views, agent management, and smart file modifications without leaving your editor. Inspired by the vscode-gemini-companion extension

Unlike other Gemini plugins for Neovim, nvim-gemini-companion is built around the MCP backend, which keeps your editor session tightly integrated with your IDE for much better experience ✨

https://github.com/user-attachments/assets/90370aa6-1ae2-477c-8529-0f26e32bdff8

🚀 Quick Start

Pre-requisites

Install any or both CLI tools and ensure they're in your system's PATH:

Installation

Install with your favorite plugin manager:

{
  "gutsavgupta/nvim-gemini-companion",
  dependencies = { "nvim-lua/plenary.nvim" },
  event = "VeryLazy",
  config = function()
    require("gemini").setup()
  end,
  keys = {
    { "<leader>gg", "<cmd>GeminiToggle<cr>", desc = "Toggle Gemini sidebar" },
    { "<leader>gc", "<cmd>GeminiSwitchToCli<cr>", desc = "Spawn or switch to AI session" },
    { '<leader>gS', '<cmd>GeminiSend<cr>', mode = { 'x' }, desc = 'Send selection to Gemini' },

  }
}

🛠️ Essential Commands & Features

Core Commands

  • :GeminiToggle - Toggle the AI sidebar
  • :GeminiSwitchToCli - Spawn or Switch to tmux/sidebar sessions
  • :GeminiSend - Send selected text to AI (use in visual mode)
  • :GeminiSendLineDiagnostic - Send line diagnostics to AI
  • :GeminiSendFileDiagnostic - Send file diagnostics to AI
  • :GeminiSwitchSidebarStyle - Switch the appearance/style of the sidebar

Sidebar Terminal Switching

When multiple commands are configured (e.g., both gemini and qwen), you can switch between active sidebar terminals using default key mappings:

  • <M-]> - Switch to the next active terminal (Alt + ])
  • <M-[> - Switch to the previous active terminal (Alt + [)

To customize these key bindings, you can override the default mappings in your setup function:

require("gemini").setup({
  cmds = { "gemini", "qwen" },
  -- Override default key mappings
  on_buf = function(buf)
    -- Add your own custom mappings
    vim.api.nvim_buf_set_keymap(buf, 't', '<Tab>', 
      '<Cmd>lua require("gemini.ideSidebar").switchSidebar()<CR>', 
      { noremap = true, silent = true }
    )
    vim.api.nvim_buf_set_keymap(buf, 't', '<S-Tab>', 
      '<Cmd>lua require("gemini.ideSidebar").switchSidebar("prev")<CR>', 
      { noremap = true, silent = true }
    )
  end
})

Note: Be aware that <Tab> and <S-Tab> may already be mapped to other functionality by the Gemini/Qwen CLIs themselves, so using these keys for terminal switching might interfere with their built-in features. Consider using alternative key bindings such as <C-Tab> and <C-S-Tab> or the default Alt-based mappings instead.

Diff Management

When AI suggests changes, you can:

  • :w or :wq - Accept changes
  • :q or :q! - Reject changes
  • :GeminiAccept / :GeminiReject - Plugin-specific commands

Tmux Integration (Optional)

Run AI agents in persistent tmux sessions:

  • :GeminiSwitchToCli tmux gemini - Use Gemini in tmux
  • :GeminiSwitchToCli sidebar qwen - Use Qwen in sidebar

🎛️ Customization Options

Sidebar Styles

Choose from multiple sidebar presets:

require("gemini").setup({
  win = {
    preset = "floating",  -- Options: "right-fixed", "left-fixed", "bottom-fixed", "floating"
    width = 0.8,
    height = 0.8,
  }
})

Multi-Agent Support

Configure which agents to use:

require("gemini").setup({
  cmds = { "gemini", "qwen" },  -- Use both
  -- or
  cmds = { "gemini" },  -- Use only Gemini
})

⚙️ Advanced Configuration

Enhanced Picker Integration

Replace default selection UI with fzf-lua/telescope:

-- For fzf-lua integration
vim.ui.select = function(items, opts, onChoice)
  require('fzf-lua').fzf_exec(items, {
    prompt = opts.prompt or 'Select from items',
    actions = {
      ['default'] = function(selected) onChoice(selected[1]) end,
    },
    winopts = { height = math.min(0.2 + #items * 0.05, 0.6) },
  })
end

Key Mappings for Quick Access

keys = {
  { "<leader>g1", "<cmd>GeminiSwitchToCli tmux gemini<cr>", desc = "Tmux Gemini" },
  { "<leader>g2", "<cmd>GeminiSwitchToCli tmux qwen<cr>", desc = "Tmux Qwen" },
  { "<leader>gs", "<cmd>GeminiSwitchSidebarStyle<cr>", desc = "Switch sidebar style" },
}

📸 Screenshots

Gemini

Qwen

✨ Key Features

  • Diff Control: Auto diff views, accept or reject suggestions directly from vim using :wq or :q.
  • CLI Agent: Dedicated terminal session for interacting with AI agents
  • Multi-Agent Support: Run both gemini and qwen-code agents simultaneously
  • Tmux Integration: Persistent sessions with state across nvim restarts
  • Context Management: Tracks open files, cursor position, and selections for AI context
  • LSP Diagnostics: Send file/line diagnostics to AI agents for enhanced debugging
  • Visual Selection: Send selected text + prompt directly to AI agents using :GeminiSend
  • Flexible Sidebar: Choose between right-fixed, left-fixed, bottom-fixed, or floating styles
  • Highly Customizable: Configure commands, window styles, and key bindings to your liking

🔧 For Developers

Run tests with:

XDG_CONFIG_HOME=./tests nvim --headless -c "PlenaryBustedDirectory tests"

🔄 Roadmap

  • Amazon-cli agent
  • More cli-agents (similar to gemini-cli or forked versions)
  • ACP Protocol: Implement ACP protocol support for deeper integration.

README mirrored from the source repository 4 days ago. The original is authoritative.

Questions

About Nvim Gemini Companion

How do I install Nvim Gemini Companion?

Run npx nvim-gemini-companion, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Nvim Gemini Companion safe to use with an AI agent?

Its trust score is 63 out of 100 (good). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Nvim Gemini Companion still maintained?

The last commit was 7 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.