diff --git a/dots/.config/nvim/after/plugin/claude-code.nvim.lua b/dots/.config/nvim/after/plugin/claude-code.nvim.lua new file mode 100644 index 0000000..07d8295 --- /dev/null +++ b/dots/.config/nvim/after/plugin/claude-code.nvim.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 = "vertical", -- 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/dots/.config/nvim/flake.lock b/dots/.config/nvim/flake.lock index 2237051..63cf20c 100644 --- a/dots/.config/nvim/flake.lock +++ b/dots/.config/nvim/flake.lock @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1765644376, - "narHash": "sha256-yqHBL2wYGwjGL2GUF2w3tofWl8qO9tZEuI4wSqbCrtE=", + "lastModified": 1765934234, + "narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "23735a82a828372c4ef92c660864e82fbe2f5fbe", + "rev": "af84f9d270d404c17699522fab95bbf928a2d92f", "type": "github" }, "original": { diff --git a/dots/.config/nvim/flake.nix b/dots/.config/nvim/flake.nix index 3fb5b12..f742492 100644 --- a/dots/.config/nvim/flake.nix +++ b/dots/.config/nvim/flake.nix @@ -152,6 +152,7 @@ fidget-nvim rustaceanvim pkgs.neovimPlugins.m-taskwarrior-d-nvim + claude-code-nvim ]; }; diff --git a/dots/.config/nvim/lua/paq-setup.lua b/dots/.config/nvim/lua/paq-setup.lua index 708208d..5b383ca 100644 --- a/dots/.config/nvim/lua/paq-setup.lua +++ b/dots/.config/nvim/lua/paq-setup.lua @@ -43,4 +43,5 @@ require("nixCatsUtils.catPacker").setup({ { "zbirenbaum/copilot-cmp" }, { "qvalentin/helm-ls.nvim", ft = "helm" }, { "mikesmithgh/kitty-scrollback.nvim" }, + { "greggh/claude-code.nvim" }, }) diff --git a/flake.lock b/flake.lock index 2530f11..6188db1 100644 --- a/flake.lock +++ b/flake.lock @@ -29,11 +29,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1765771449, - "narHash": "sha256-ZoHRPmTzwC1ndX3NQB/b/WKtU1WduAJdLI4j8eW/QFM=", + "lastModified": 1766046711, + "narHash": "sha256-PijxRQcvSgQae3qBdY4+IGMsMFL67N3D7sBJdZxDii4=", "owner": "rycee", "repo": "nur-expressions", - "rev": "5bcf9a2aeb4d361c2ff918a146b3fcc1e136b9ca", + "rev": "7163ab9a8e64cd29c45e8f93fbc038b12056e6fc", "type": "gitlab" }, "original": { @@ -68,11 +68,11 @@ ] }, "locked": { - "lastModified": 1765682243, - "narHash": "sha256-yeCxFV/905Wr91yKt5zrVvK6O2CVXWRMSrxqlAZnLp0=", + "lastModified": 1765980955, + "narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=", "owner": "nix-community", "repo": "home-manager", - "rev": "58bf3ecb2d0bba7bdf363fc8a6c4d49b4d509d03", + "rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173", "type": "github" }, "original": { @@ -153,11 +153,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1765779637, + "narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", + "rev": "1306659b587dc277866c7b69eb97e5f07864d8c4", "type": "github" }, "original": { @@ -340,11 +340,11 @@ ] }, "locked": { - "lastModified": 1765684837, - "narHash": "sha256-fJCnsYcpQxxy/wit9EBOK33c0Z9U4D3Tvo3gf2mvHos=", + "lastModified": 1765836173, + "narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "94d8af61d8a603d33d1ed3500a33fcf35ae7d3bc", + "rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63", "type": "github" }, "original": {