### Default Plugin Configuration Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Pass a table to the setup function to configure the plugin. This example shows all available default settings. ```lua require("claude-code").setup({ -- Terminal window settings window = { split_ratio = 0.3, position = "botright", enter_insert = true, hide_numbers = true, hide_signcolumn = true, -- Floating window configuration (only applies when position = "float") float = { width = "80%", height = "80%", row = "center", col = "center", relative = "editor", border = "rounded", }, }, -- File refresh settings refresh = { enable = true, updatetime = 100, timer_interval = 1000, show_notifications = true, }, -- Git project settings git = { use_git_root = true, }, -- Shell-specific settings shell = { separator = '&&', pushd_cmd = 'pushd', popd_cmd = 'popd', }, -- Command settings command = "claude", -- Command variants command_variants = { -- Conversation management continue = "--continue", resume = "--resume", -- Output options verbose = "--verbose", }, -- Keymaps keymaps = { toggle = { normal = "", terminal = "", variants = { continue = "cC", verbose = "cV", }, }, window_navigation = true, scrolling = true, } }) ``` -------------------------------- ### Install Claude Code with lazy.nvim Source: https://context7.com/greggh/claude-code.nvim/llms.txt Complete installation example using lazy.nvim package manager, including dependencies and configuration options for window, refresh, and git settings. ```lua -- In your lazy.nvim plugin specification return { "greggh/claude-code.nvim", dependencies = { "nvim-lua/plenary.nvim", -- Required for git operations }, keys = { { "", "ClaudeCode", desc = "Toggle Claude Code" }, { "cC", "ClaudeCodeContinue", desc = "Claude Code Continue" }, { "cV", "ClaudeCodeVerbose", desc = "Claude Code Verbose" }, }, config = function() require("claude-code").setup({ window = { split_ratio = 0.4, position = "float", float = { width = "85%", height = "85%", border = "rounded", }, }, refresh = { enable = true, show_notifications = true, }, git = { use_git_root = true, multi_instance = true, }, }) end, } ``` -------------------------------- ### Install Neovim and Dependencies on Windows using Scoop Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim and development tools like git, make, ripgrep, and fd using Scoop. Also installs luarocks and stylua. Requires Scoop to be installed first. ```powershell # Install scoop if not already installed Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression # Install dependencies scoop install neovim git make ripgrep fd # Install luarocks scoop install luarocks # Install luacheck luarocks install luacheck # Install stylua scoop install stylua ``` -------------------------------- ### Install Neovim and Dependencies on Ubuntu/Debian Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim from a PPA for the latest version, along with essential development tools like luarocks, ripgrep, fd, git, and make. It also includes steps for installing luacheck and stylua. ```bash sudo add-apt-repository ppa:neovim-ppa/unstable sudo apt-get update sudo apt-get install neovim # Install luarocks and other dependencies sudo apt-get install luarocks ripgrep fd-find git make # Install luacheck sudo luarocks install luacheck # Install stylua curl -L -o stylua.zip $(curl -s https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | grep -o "https://.*stylua-linux-x86_64.zip") unzip stylua.zip chmod +x stylua sudo mv stylua /usr/local/bin/ ``` -------------------------------- ### Install Neovim and Dependencies on Fedora Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim and development tools such as luarocks, ripgrep, fd, git, and make using dnf. Includes instructions for installing luacheck and stylua. ```bash sudo dnf install neovim luarocks ripgrep fd-find git make # Install luacheck sudo luarocks install luacheck # Install stylua curl -L -o stylua.zip $(curl -s https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | grep -o "https://.*stylua-linux-x86_64.zip") unzip stylua.zip chmod +x stylua sudo mv stylua /usr/local/bin/ ``` -------------------------------- ### Install Neovim and Dependencies on macOS Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim and development tools like luarocks, ripgrep, fd, git, and make using Homebrew. Assumes Homebrew is already installed or provides instructions to install it. Includes steps for luacheck and stylua. ```bash # Install Homebrew if not already installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install dependencies brew install neovim luarocks ripgrep fd git make # Install luacheck luarocks install luacheck # Install stylua brew install stylua ``` -------------------------------- ### Install Git Hooks Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Git hooks for the project. This should be run after cloning the repository and navigating into the project directory. ```bash cd claude-code.nvim ./scripts/setup-hooks.sh ``` -------------------------------- ### Install Neovim and Dependencies on Windows using Chocolatey Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim and development tools like git, make, ripgrep, and fd using Chocolatey. Also installs luarocks. Requires Chocolatey to be installed first. Stylua installation requires manual download from GitHub. ```powershell # Install chocolatey if not already installed Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) # Install dependencies choco install neovim git make ripgrep fd # Install luarocks choco install luarocks # Install luacheck luarocks install luacheck # Install stylua (download from GitHub) # Visit https://github.com/JohnnyMorganz/StyLua/releases ``` -------------------------------- ### Install Neovim and Dependencies on Arch Linux Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Installs Neovim and common development tools like luarocks, ripgrep, fd, git, and make using pacman. It also covers installing luacheck via luarocks and stylua from the AUR. ```bash sudo pacman -S neovim luarocks ripgrep fd git make # Install luacheck sudo luarocks install luacheck # Install stylua (from AUR) yay -S stylua ``` -------------------------------- ### Install claude-code.nvim with vim-plug Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Install the plugin using vim-plug. Requires nvim-lua/plenary.nvim. Add lua require('claude-code').setup() to your init.vim after installation. ```vim Plug 'nvim-lua/plenary.nvim' Plug 'greggh/claude-code.nvim' " After installing, add this to your init.vim: " lua require('claude-code').setup() ``` -------------------------------- ### Install claude-code.nvim with lazy.nvim Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Install the plugin using lazy.nvim. Requires nvim-lua/plenary.nvim for git operations. Call require('claude-code').setup() in your configuration. ```lua return { "greggh/claude-code.nvim", dependencies = { "nvim-lua/plenary.nvim", -- Required for git operations }, config = function() require("claude-code").setup() end } ``` -------------------------------- ### Install claude-code.nvim with packer.nvim Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Install the plugin using packer.nvim. Requires nvim-lua/plenary.nvim for git operations. Call require('claude-code').setup() in your configuration. ```lua use { 'greggh/claude-code.nvim', requires = { 'nvim-lua/plenary.nvim', -- Required for git operations }, config = function() require('claude-code').setup() end } ``` -------------------------------- ### Setup Git Hooks for Code Formatting Source: https://github.com/greggh/claude-code.nvim/blob/main/CONTRIBUTING.md Execute this script to set up pre-commit hooks. These hooks automatically format Lua code using StyLua before each commit, ensuring consistent code style. ```bash ./scripts/setup-hooks.sh ``` -------------------------------- ### Initialize Claude Code Plugin with Default Configuration Source: https://context7.com/greggh/claude-code.nvim/llms.txt Use this basic setup for default plugin behavior. It initializes the plugin with standard settings. ```lua require("claude-code").setup() ``` -------------------------------- ### Clone Claude-Code.nvim Repository Source: https://github.com/greggh/claude-code.nvim/blob/main/CONTRIBUTING.md Use this command to clone your fork of the repository to your local machine. Ensure you have Git installed and configured. ```bash git clone https://github.com/greggh/claude-code.nvim.git ``` -------------------------------- ### Plenary Busted Test Structure Example Source: https://github.com/greggh/claude-code.nvim/blob/main/tests/README.md A basic template for writing tests using the plenary.busted framework. It demonstrates the describe and it functions for organizing tests and assertions. ```lua local assert = require('luassert') local describe = require('plenary.busted').describe local it = require('plenary.busted').it describe('module_name', function() describe('function_name', function() it('should do something', function() -- Test code here assert.are.equal(expected, actual) end) end) end) ``` -------------------------------- ### Default Plugin Configuration Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt The default configuration for the claude-code.nvim plugin. Customize terminal window, file refresh, and git settings by passing a table to the setup function. ```lua require("claude-code").setup({ -- Terminal window settings window = { split_ratio = 0.3, -- Percentage of screen for the terminal window (height or width) position = "botright", -- Position of the window: "botright", "topleft", "vertical"/"vsplit", "float", etc. enter_insert = true, -- Whether to enter insert mode when opening Claude Code start_in_normal_mode = false, -- Whether to start in normal mode instead of insert mode hide_numbers = true, -- Hide line numbers in the terminal window hide_signcolumn = true, -- Hide the sign column in the terminal window -- Floating window configuration (only applies when position = "float") float = { width = "80%", -- Width: number of columns or percentage string height = "80%", -- Height: number of rows or percentage string row = "center", -- Row position: number, "center", or percentage string col = "center", -- Column position: number, "center", or percentage string relative = "editor", -- Relative to: "editor" or "cursor" border = "rounded", -- Border style: "none", "single", "double", "rounded", "solid", "shadow" }, }, -- File refresh settings refresh = { enable = true, -- Enable file change detection updatetime = 100, -- updatetime when Claude Code is active (milliseconds) timer_interval = 1000, -- How often to check for file changes (milliseconds) show_notifications = true, -- Show notification when files are reloaded }, -- Git project settings git = { ``` -------------------------------- ### Get Claude Code Plugin Version Source: https://context7.com/greggh/claude-code.nvim/llms.txt Retrieve the current version of the Claude Code plugin. The version can be accessed as a string or as individual components (major, minor, patch). ```lua -- Get version using the function local version = require("claude-code").get_version() print(version) -- Output: 0.4.2 -- Display version via command vim.cmd("ClaudeCodeVersion") -- Notification: Claude Code version: 0.4.2 -- Access version components directly local v = require("claude-code").version print(v.major) -- Output: 0 print(v.minor) -- Output: 4 print(v.patch) -- Output: 2 ``` -------------------------------- ### Get Git Root Directory Source: https://context7.com/greggh/claude-code.nvim/llms.txt Retrieve the git root directory path for the current buffer if it's within a git repository. This function is used internally for setting the working directory and instance identification. ```lua local git = require("claude-code.git") -- Get the git root directory local git_root = git.get_git_root() if git_root then print("Git root: " .. git_root) -- Output: Git root: /home/user/my-project else print("Not in a git repository") end ``` -------------------------------- ### Set Up Pre-commit Hooks Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Initialize pre-commit hooks for the project by running the setup-hooks.sh script. This automates code quality checks before commits. ```bash # Set up pre-commit hooks scripts/setup-hooks.sh ``` -------------------------------- ### Run Neovim with Minimal Config (Option 1) Source: https://github.com/greggh/claude-code.nvim/blob/main/tests/README.md Execute Neovim directly from the plugin directory using a clean slate and the minimal initialization file. This is useful for quick testing. ```bash nvim --clean -u tests/minimal-init.lua ``` -------------------------------- ### Run Neovim with Minimal Config (Option 2) Source: https://github.com/greggh/claude-code.nvim/blob/main/tests/README.md Copy the minimal initialization file to a separate directory and run Neovim from there. This isolates the test environment. ```bash mkdir ~/claude-test cp tests/minimal-init.lua ~/claude-test/ cd ~/claude-test nvim --clean -u minimal-init.lua ``` -------------------------------- ### Run Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Execute all tests for the project using the make command. This ensures code quality and functionality. ```bash # Run tests make test ``` -------------------------------- ### Format Code Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Format the project's code using the make format command. This ensures consistent code style. ```bash # Format code make format ``` -------------------------------- ### Run Test Suite with Makefile Source: https://github.com/greggh/claude-code.nvim/blob/main/CONTRIBUTING.md These commands utilize the Makefile to run the project's test suite. Use 'make test' for all tests, or specific targets like 'make test-basic' for focused testing. ```bash # Run all tests make test # Run specific test groups make test-basic # Run basic functionality tests make test-config # Run configuration tests make test-plenary # Run plenary tests ``` -------------------------------- ### Run Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Executes the project's test suite. Different variations are available for running all tests, verbose output, or specific test suites. ```bash # Run all tests make test # Run with verbose output make test-verbose # Run specific test suites make test-basic make test-config ``` -------------------------------- ### Enable Multi-Instance Support Source: https://context7.com/greggh/claude-code.nvim/llms.txt Configure the plugin to support multiple Claude Code instances, one for each git repository root. This is enabled by default. ```lua -- Default configuration enables multi-instance mode require("claude-code").setup({ git = { use_git_root = true, -- Use git root as working directory multi_instance = true, -- One Claude instance per git repository }, }) ``` ```lua -- Disable multi-instance mode to use a single global Claude instance require("claude-code").setup({ git = { multi_instance = false, -- Use a single global Claude instance }, }) ``` -------------------------------- ### Initialize Claude Code Plugin with Custom Configuration Source: https://context7.com/greggh/claude-code.nvim/llms.txt Configure terminal window, file refresh, git integration, command, and keymaps for the Claude Code plugin. Customize settings like split ratio, position, auto-refresh, git root usage, and keybindings. ```lua -- Setup with custom configuration require("claude-code").setup({ -- Terminal window settings window = { split_ratio = 0.3, -- Percentage of screen for terminal window position = "botright", -- Position: "botright", "topleft", "vertical", "float" enter_insert = true, -- Enter insert mode when opening Claude Code hide_numbers = true, -- Hide line numbers in terminal window hide_signcolumn = true, -- Hide sign column in terminal window }, -- File refresh settings refresh = { enable = true, -- Enable file change detection updatetime = 100, -- updatetime when Claude Code is active (ms) timer_interval = 1000, -- How often to check for file changes (ms) show_notifications = true, -- Show notification when files are reloaded }, -- Git project settings git = { use_git_root = true, -- Set CWD to git root when opening Claude Code multi_instance = true, -- Use multiple Claude instances (one per git root) }, -- Command settings command = "claude", -- Command used to launch Claude Code -- Keymaps keymaps = { toggle = { normal = "", -- Normal mode keymap for toggling terminal = "", -- Terminal mode keymap for toggling }, window_navigation = true, -- Enable navigation scrolling = true, -- Enable scrolling } }) ``` -------------------------------- ### Write Tests in Lua Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Demonstrates the basic structure for writing tests in Lua using a BDD-style API provided by the `tests.run_tests` module. Includes `describe`, `it`, and `expect` functions. ```lua local test = require("tests.run_tests") test.describe("Feature name", function() test.it("should do something", function() -- Test code test.expect(result).to_be(expected) end) end) ``` -------------------------------- ### Test NVIM Detection Logic Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md A script to verify the logic for detecting the Neovim binary, especially when running tests from within Neovim where `$NVIM` might point to a socket file. ```bash ./scripts/test_nvim_detection.sh ``` -------------------------------- ### Run Configuration Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/test/README.md Execute only the configuration validation and merging tests for the Claude Code plugin. ```bash make test-config ``` -------------------------------- ### Run Basic Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/test/README.md Execute only the basic functionality tests for the Claude Code plugin. ```bash make test-basic ``` -------------------------------- ### Run All Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/test/README.md Execute all automated tests for the Claude Code plugin. ```bash make test ``` -------------------------------- ### Configure Floating Window Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Set up Claude Code to use a floating window with custom dimensions and border style. Ensure the 'position' is set to 'float'. ```lua require("claude-code").setup({ window = { position = "float", float = { width = "90%", -- Take up 90% of the editor width height = "90%", -- Take up 90% of the editor height row = "center", -- Center vertically col = "center", -- Center horizontally relative = "editor", border = "double", -- Use double border style }, }, }) ``` -------------------------------- ### Configure Shell Commands Source: https://context7.com/greggh/claude-code.nvim/llms.txt Customize shell-specific commands for different environments like bash, zsh, or nushell. This includes the command separator and directory change commands. ```lua -- Default configuration for bash/zsh require("claude-code").setup({ shell = { separator = '&&', -- Command separator pushd_cmd = 'pushd', popd_cmd = 'popd', }, }) ``` ```lua -- Configuration for nushell require("claude-code").setup({ shell = { separator = ';', -- Nushell uses ; as separator pushd_cmd = 'enter', -- Nushell equivalent of pushd popd_cmd = 'exit', -- Nushell equivalent of popd }, }) ``` -------------------------------- ### Disable Multi-Instance Mode Configuration Source: https://github.com/greggh/claude-code.nvim/blob/main/CLAUDE.md Configure the plugin to use a single global Claude instance instead of multiple instances per git repository. Set the `multi_instance` option within the `git` table to `false`. ```lua require('claude-code').setup({ git = { multi_instance = false -- Use a single global Claude instance } }) ``` -------------------------------- ### Configure Custom Command Variants and Keymaps Source: https://context7.com/greggh/claude-code.nvim/llms.txt Extend Claude Code plugin configuration to include custom command variants and their corresponding keymaps. This allows for specialized interactions with the Claude Code CLI. ```lua -- Custom configuration with additional variants require("claude-code").setup({ command_variants = { continue = "--continue", resume = "--resume", verbose = "--verbose", -- Add custom variants debug = "--debug", }, keymaps = { toggle = { variants = { continue = "cC", verbose = "cV", debug = "cD", -- Custom keymap for custom variant }, }, } }) ``` -------------------------------- ### Configure Claude Code Plugin Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Set the command to launch Claude Code and define command variants for specific actions like resuming conversations or enabling verbose output. Ensure the command does not include --cwd. ```lua { use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project) }, -- Command settings command = "claude", -- Command used to launch Claude Code (do not include --cwd) -- Command variants command_variants = { -- Conversation management continue = "--continue", -- Resume the most recent conversation resume = "--resume", -- Display an interactive conversation picker -- Output options verbose = "--verbose", -- Enable verbose logging with full turn-by-turn output }, -- Keymaps keymaps = { toggle = { normal = "ac", -- Normal mode keymap for toggling Claude Code terminal = "", -- Terminal mode keymap for toggling Claude Code variants = { continue = "cC", -- Normal mode keymap for Claude Code with continue flag verbose = "cV", -- Normal mode keymap for Claude Code with verbose flag }, } } }) ``` -------------------------------- ### Run Verbose Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/test/README.md Execute all automated tests with verbose output for detailed debugging. ```bash make test-debug ``` -------------------------------- ### Configure Keymaps for Claude Code Source: https://context7.com/greggh/claude-code.nvim/llms.txt Set up keybindings for toggling Claude Code and navigating terminal windows. You can disable default keymaps and set custom ones, or manually define keymaps using vim.keymap.set. ```lua require("claude-code").setup({ keymaps = { toggle = { normal = "", -- Normal mode toggle (set to false to disable) terminal = "", -- Terminal mode toggle (set to false to disable) variants = { continue = "cC", -- Toggle with --continue flag verbose = "cV", -- Toggle with --verbose flag }, }, window_navigation = true, -- Enable for window navigation scrolling = true, -- Enable for scrolling }, }) -- Disable default keymaps and set custom ones require("claude-code").setup({ keymaps = { toggle = { normal = false, -- Disable default normal mode keymap terminal = false, -- Disable default terminal mode keymap }, window_navigation = false, -- Disable window navigation keymaps scrolling = false, -- Disable scrolling keymaps }, }) -- Set custom keymaps manually vim.keymap.set('n', 'ai', 'ClaudeCode', { desc = 'Toggle Claude Code' }) vim.keymap.set('n', 'ac', 'ClaudeCodeContinue', { desc = 'Claude Code Continue' }) ``` -------------------------------- ### Check Code Quality Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Perform a code quality check using the make lint command. This helps maintain code standards. ```bash # Check code quality make lint ``` -------------------------------- ### Run All Automated Tests Source: https://github.com/greggh/claude-code.nvim/blob/main/tests/README.md Execute the shell script to run all automated tests for the Claude Code plugin. This provides a comprehensive check of plugin functionality. ```bash ./scripts/test.sh ``` -------------------------------- ### Configure Floating Window Appearance Source: https://context7.com/greggh/claude-code.nvim/llms.txt Set up Claude Code to display in a floating window with custom dimensions and border styles. Supports percentage or absolute values for width and height, and relative positioning to the editor or cursor. ```lua require("claude-code").setup({ window = { position = "float", float = { width = "90%", -- Width as percentage of editor (or number of columns) height = "90%", -- Height as percentage of editor (or number of rows) row = "center", -- Vertical position: number, "center", or percentage col = "center", -- Horizontal position: number, "center", or percentage relative = "editor", -- Position relative to: "editor" or "cursor" border = "double", -- Border: "none", "single", "double", "rounded", "solid", "shadow" }, }, }) ``` ```lua -- Example with absolute positioning require("claude-code").setup({ window = { position = "float", float = { width = 120, -- 120 columns wide height = 40, -- 40 rows tall row = 5, -- 5 rows from top col = 10, -- 10 columns from left relative = "editor", border = "rounded", }, }, }) ``` -------------------------------- ### Configure File Refresh Module Source: https://context7.com/greggh/claude-code.nvim/llms.txt Enable or disable the file refresh module, which automatically detects and reloads files modified externally. Customize settings like update interval and notification display. ```lua -- Enable file refresh with custom settings require("claude-code").setup({ refresh = { enable = true, -- Enable file change detection updatetime = 100, -- Faster CursorHold events when Claude Code is active timer_interval = 1000, -- Check for file changes every second show_notifications = true, -- Show notification when files are reloaded }, }) ``` ```lua -- Disable file refresh entirely require("claude-code").setup({ refresh = { enable = false, }, }) ``` -------------------------------- ### Open Claude Code with Specific Variants via Vim Command Source: https://context7.com/greggh/claude-code.nvim/llms.txt Execute Vim commands to open Claude Code with predefined variants like `--continue`, `--resume`, or `--verbose`. These commands modify the behavior of the Claude Code CLI. ```vim vim.cmd("ClaudeCodeContinue") ``` ```vim vim.cmd("ClaudeCodeResume") ``` ```vim vim.cmd("ClaudeCodeVerbose") ``` -------------------------------- ### Variant Mode Key Mappings Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Key mappings for toggling Claude Code with specific flags like --continue or --verbose. ```vim cC ``` ```vim cV ``` -------------------------------- ### Default Key Mappings for Toggling Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Default key mappings for toggling the Claude Code terminal window in normal and terminal modes. ```vim ac ``` ```vim ``` -------------------------------- ### Displaying Messages in Neovim Source: https://github.com/greggh/claude-code.nvim/blob/main/tests/README.md Use the :messages command in Neovim to view recent log messages, which is helpful for debugging and troubleshooting. ```vim :messages ``` -------------------------------- ### Toggle Claude Code via Lua Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Execute the :ClaudeCode command from Lua, or map it to a keybinding for convenient access. ```lua vim.cmd[[ClaudeCode]] ``` ```lua vim.keymap.set('n', 'cc', 'ClaudeCode', { desc = 'Toggle Claude Code' }) ``` -------------------------------- ### Open Claude Code with Specific Variants via Lua Function Source: https://context7.com/greggh/claude-code.nvim/llms.txt Call the `toggle_with_variant()` Lua function to launch Claude Code with specific command-line arguments. This allows for programmatic control over variants like 'continue' or 'verbose'. ```lua require("claude-code").toggle_with_variant("continue") ``` ```lua require("claude-code").toggle_with_variant("verbose") ``` -------------------------------- ### Verbose Output Command Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Use the :ClaudeCodeVerbose command to toggle Claude Code with verbose logging enabled, showing full turn-by-turn output via the --verbose flag. This command is automatically generated. ```vim :ClaudeCodeVerbose ``` -------------------------------- ### Claude Code Terminal Navigation Keymaps Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Key mappings for navigating between windows within the Claude Code terminal. ```vim ``` ```vim ``` ```vim ``` ```vim ``` -------------------------------- ### Default Key Mappings for Claude Code Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt These are the default key mappings for toggling the Claude Code terminal and its variants. Customize these in your Neovim configuration. ```vim ac Toggle Claude Code terminal window (normal mode) Toggle Claude Code terminal window (both normal and terminal modes) Variant mode mappings (if configured): cC Toggle Claude Code with --continue flag cV Toggle Claude Code with --verbose flag Additionally, when in the Claude Code terminal: Move to the window on the left Move to the window below Move to the window above Move to the window on the right Scroll full-page down Scroll full-page up Note: After scrolling with or , you'll need to press the 'i' key to re-enter insert mode so you can continue typing to Claude Code. ``` -------------------------------- ### Interactive Conversation Picker Command Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Use the :ClaudeCodeResume command to toggle Claude Code and display an interactive conversation picker using the --resume flag. This command is automatically generated. ```vim :ClaudeCodeResume ``` -------------------------------- ### Map Keybinding to Toggle Claude Code Terminal Source: https://context7.com/greggh/claude-code.nvim/llms.txt Assign a custom keybinding in normal mode to toggle the Claude Code terminal. This provides quick access to the feature. ```lua vim.keymap.set('n', 'cc', function() require("claude-code").toggle() end, { desc = 'Toggle Claude Code' }) ``` -------------------------------- ### Resume Conversation Command Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Use the :ClaudeCodeContinue command to toggle Claude Code and resume the most recent conversation using the --continue flag. This command is automatically generated. ```vim :ClaudeCodeContinue ``` -------------------------------- ### Toggle Claude Code Terminal via Vim Command Source: https://context7.com/greggh/claude-code.nvim/llms.txt Use the built-in Vim command to toggle the Claude Code terminal. This command will open, hide, or create the terminal as needed. ```vim vim.cmd("ClaudeCode") ``` -------------------------------- ### Toggle Claude Code Command Source: https://github.com/greggh/claude-code.nvim/blob/main/doc/claude-code.txt Use the :ClaudeCode command to toggle the Claude Code terminal window. This command is automatically generated based on configuration. ```vim :ClaudeCode ``` -------------------------------- ### Bypass Pre-commit Hooks Source: https://github.com/greggh/claude-code.nvim/blob/main/DEVELOPMENT.md Command to bypass pre-commit hooks during a Git commit. Use this when you need to commit changes without running the automatic formatting, linting, or testing checks. ```bash git commit --no-verify ``` -------------------------------- ### Toggle Claude Code Terminal via Lua Function Source: https://context7.com/greggh/claude-code.nvim/llms.txt Call the `toggle()` function directly from Lua to manage the Claude Code terminal. This offers programmatic control over the terminal's visibility. ```lua require("claude-code").toggle() ``` -------------------------------- ### Claude Code Terminal Scrolling Keymaps Source: https://github.com/greggh/claude-code.nvim/blob/main/README.md Key mappings for scrolling up and down within the Claude Code terminal. Press 'i' to re-enter insert mode after scrolling. ```vim ``` ```vim ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.