Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Commands not available (claudecode doesn't load?) #128

@nxtkofi

Description

@nxtkofi

Bug Description

I installed claudecode by adding it to my nvim config, it automatically installed with lazy, but it doesn't seem to Load at all in any kind of file, hence I can't access any of the commands or keymaps.
I have claude-code cli installed globally via npm

To Reproduce

  1. Add claudecode.nvim plugin with one of the suggested configurations:
return {
	"coder/claudecode.nvim",
	dependencies = { "folke/snacks.nvim" },
	config = true,
	keys = {
		{ "<leader>a",  nil,                              desc = "AI/Claude Code" },
		{ "<leader>ac", "<cmd>ClaudeCode<cr>",            desc = "Toggle Claude" },
		{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>",       desc = "Focus Claude" },
		{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>",   desc = "Resume Claude" },
		{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
		{ "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
		{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>",       desc = "Add current buffer" },
		{ "<leader>as", "<cmd>ClaudeCodeSend<cr>",        mode = "v",                  desc = "Send to Claude" },
		{
			"<leader>as",
			"<cmd>ClaudeCodeTreeAdd<cr>",
			desc = "Add file",
			ft = { "NvimTree", "neo-tree", "oil", "minifiles" },
		},
		-- Diff management
		{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
		{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>",   desc = "Deny diff" },
	},
}
  1. Restart Neovim, wait for lazy to install the plugin
  2. Restart Neovim after lazy installation
  3. Enter any kind of file and try to type :ClaudeCode or any command starting with :Claude
  4. Command doesn't work, check :Lazy if the plugin is loaded, it isn't
Image

Expected Behavior

I'd like the plugin to load and to be able to use it.

Environment

  • Neovim version: 0.11.4
  • Claude Code CLI version: 1.0.111
  • OS: Arch Linux, 6.16.5-arch1-1
  • Plugin version: latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions