From bb4a3b78a6bd3c910daacf2279fd361a13fc61c1 Mon Sep 17 00:00:00 2001 From: Kendall Whitman Date: Wed, 22 Apr 2026 18:15:45 -0500 Subject: [PATCH] update neovim config --- nvim/.config/nvim/init.lua | 1 + nvim/.config/nvim/lua/plugins/claude.lua | 61 ++++++++++++++++++++++++ nvim/.config/nvim/lua/plugins/init.lua | 1 + nvim/.config/nvim/nvim-pack-lock.json | 4 ++ 4 files changed, 67 insertions(+) create mode 100644 nvim/.config/nvim/lua/plugins/claude.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index b138394..110a9ee 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -98,6 +98,7 @@ vim.pack.add({ "https://github.com/MeanderingProgrammer/render-markdown.nvim", "https://github.com/williamboman/mason.nvim", "https://github.com/williamboman/mason-lspconfig.nvim", + "https://github.com/greggh/claude-code.nvim", }) -- Plugin Configs diff --git a/nvim/.config/nvim/lua/plugins/claude.lua b/nvim/.config/nvim/lua/plugins/claude.lua new file mode 100644 index 0000000..e0c8524 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/claude.lua @@ -0,0 +1,61 @@ +require("claude-code").setup({ + -- Terminal window settings + window = { + split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits) + position = "botright", -- Position of the window: "botright", "topleft", "vertical", "float", etc. + enter_insert = true, -- Whether to enter insert mode when opening Claude Code + 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 = { + use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project) + }, + -- Shell-specific settings + shell = { + separator = '&&', -- Command separator used in shell commands + pushd_cmd = 'pushd', -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell) + popd_cmd = 'popd', -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell) + }, + -- Command settings + command = "claude", -- Command used to launch Claude Code + -- 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 = "", -- Normal mode keymap for toggling Claude Code, false to disable + terminal = "", -- Terminal mode keymap for toggling Claude Code, false to disable + variants = { + continue = "cC", -- Normal mode keymap for Claude Code with continue flag + verbose = "cV", -- Normal mode keymap for Claude Code with verbose flag + }, + }, + window_navigation = true, -- Enable window navigation keymaps () + scrolling = true, -- Enable scrolling keymaps () for page up/down + } +}) diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua index 0346e5b..4afe98e 100644 --- a/nvim/.config/nvim/lua/plugins/init.lua +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -9,3 +9,4 @@ require('plugins.treesitter') require('plugins.cmp') require('plugins.render-markdown') require('plugins.mason') +require('plugins.claude') diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index 0a9595a..6fcabe4 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -4,6 +4,10 @@ "rev": "979b6c82f60cfa80f4cf437d77446d0ded0addf0", "src": "https://github.com/Pocco81/auto-save.nvim" }, + "claude-code.nvim": { + "rev": "55c0cb59828fbc3bec744288286a46f5d5750b83", + "src": "https://github.com/greggh/claude-code.nvim" + }, "cmp-buffer": { "rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657", "src": "https://github.com/hrsh7th/cmp-buffer"