Skip to content

ebrentnelson/claude-code-pane.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

claude-code-pane.nvim

A Neovim plugin that provides a sticky terminal pane for running Claude Code (CLI) directly within Neovim.

Features

  • 🔒 Sticky pane - Always stays on the far right at fixed width (20% by default)
  • 📌 Fixed size - Won't resize when other windows open
  • 🔄 Persistent session - Terminal session persists when closed/reopened
  • ⌨️ Terminal keybindings - Send ESC to Claude terminal with <C-e>
  • 🎨 Integration-friendly - Works alongside nvim-tree and other sidebar plugins

Requirements

Installation

Using lazy.nvim

{
  'ebrentnelson/claude-code-pane.nvim',
  dependencies = { 'akinsho/toggleterm.nvim' },
  config = function()
    require('claude-code-pane').setup({
      keymap = '<leader>cc'  -- Optional: keymap to toggle the pane
    })
  end,
}
use {
  'ebrentnelson/claude-code-pane.nvim',
  requires = { 'akinsho/toggleterm.nvim' },
  config = function()
    require('claude-code-pane').setup({
      keymap = '<leader>cc'
    })
  end
}

Using vim-plug

Plug 'akinsho/toggleterm.nvim'
Plug 'ebrentnelson/claude-code-pane.nvim'

lua << EOF
require('claude-code-pane').setup({
  keymap = '<leader>cc'
})
EOF

Usage

Commands

  • :ClaudeCodeOpen - Open the Claude Code terminal pane
  • :ClaudeCodeClose - Close the pane
  • :ClaudeCodeToggle - Toggle the pane

Keybindings

Normal Mode

  • <leader>cc - Toggle Claude Code pane (if configured in setup)

Terminal Mode (when in Claude pane)

  • <C-\><C-n> - Exit terminal mode to normal mode (standard Neovim)
  • <C-e> - Send actual ESC to the Claude terminal

Configuration

require('claude-code-pane').setup({
  -- Optional: keymap to toggle the pane
  -- Set to nil or false to disable
  keymap = '<leader>cc',
})

How It Works

The plugin creates a toggleterm terminal instance with:

  • Fixed 20% width on the right side of the screen
  • winfixwidth option to prevent manual resizing
  • Automatic repositioning when other plugins try to resize windows
  • Smart handling of nvim-tree and other sidebar plugins

Troubleshooting

"claude: command not found"

Make sure Claude Code CLI is installed and in your PATH:

which claude

Pane appears on the left instead of right

The plugin automatically moves the pane to the far right on open. If issues persist, try closing and reopening the pane.

Width keeps changing

The plugin monitors WinResized, WinNew, and BufWinEnter events to maintain fixed width. If you experience issues, please open an issue with your Neovim version and plugin list.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages