claude-code.nvim  by greggh

Neovim plugin for Claude Code integration

created 5 months ago
944 stars

Top 39.7% on sourcepulse

GitHubView on GitHub
Project Summary

This plugin provides seamless integration between the Claude Code AI assistant and the Neovim text editor, allowing users to interact with Claude Code directly within Neovim. It targets Neovim users who want to leverage AI for coding tasks without leaving their preferred environment, offering enhanced productivity through integrated workflows.

How It Works

The plugin creates a dedicated terminal buffer within Neovim to run the Claude Code CLI. It leverages Neovim's autocommand system to monitor file changes, automatically reloading buffers modified by Claude Code. The integration includes automatic detection of Git project roots to set the correct working directory for Claude Code, and provides customizable keymaps for toggling the Claude Code terminal and managing conversations.

Quick Start & Requirements

  • Installation: Via lazy.nvim, packer.nvim, or vim-plug.
  • Prerequisites: Neovim 0.7.0+, Claude Code CLI tool in PATH, plenary.nvim.
  • Configuration: require("claude-code").setup({...}) with extensive options for window, refresh, git, shell, command, and keymap settings.
  • Usage: :ClaudeCode command or mapped keybinds.
  • Docs: CHANGELOG.md, DEVELOPMENT.md

Highlighted Details

  • Real-time buffer updates when files are changed externally by Claude Code.
  • Automatic detection and use of Git project root as the working directory.
  • Integration with which-key for enhanced keymap discoverability.
  • Comprehensive testing framework with 44 tests for reliability.

Maintenance & Community

  • Developed by Gregg Housh.
  • Community support via GitHub Discussions, Issues, and Pull Requests.
  • Uses Semantic Versioning and adheres to the Contributor Covenant Code of Conduct.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

The plugin requires the Claude Code CLI to be installed and accessible in the system's PATH. Scrolling within the Claude Code terminal buffer with Ctrl-f or Ctrl-b requires pressing i to re-enter insert mode for further interaction.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
8
Star History
855 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.