-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
Bug Description
focus_after_send = true silently has no effect when terminal.provider = "none". No
warning or error is shown — the option is accepted but never fires, leaving users with
external terminal setups unable to use this feature.
To Reproduce
- Configure the plugin with
terminal.provider = "none"andfocus_after_send = true - Open a file in Neovim and make a visual selection
- Run
ClaudeCodeSend - Focus remains on Neovim — Claude session is never focused
Expected Behavior
Either:
focus_after_sendaccepts a user-defined callback so external terminal users can
implement their own focus logic, or- A warning is emitted when
focus_after_send = trueis set alongsideprovider = "none"
to make it clear the option has no effect
Environment
- Neovim version: [e.g. 0.10.0]
- Claude Code CLI version: [e.g. latest]
- OS: macOS
- Plugin version: [e.g. latest]
Error Messages
No error messages — the option silently does nothing.
Additional Context
This affects any user running Claude Code in an external terminal (tmux pane, wezterm
split, etc.) rather than a managed provider. A callback-based API would make this
first-class without requiring the plugin to know about specific terminal emulators:
require("claudecode").setup({
focus_after_send = function()
-- user-defined focus logic
end,
})
-- Workaround: wrap the send keymap in a Lua function that manually triggers a tmux command
after sending:
local function send_and_focus_claude()
vim.cmd("ClaudeCodeSend")
local pane = vim.fn.system(
"tmux list-panes -F '#{pane_index}:#{pane_current_command}' | grep -i claude | cut -d:
-f1 | head -1 | tr -d '\n'"
)
if pane ~= "" then
vim.fn.system("tmux select-pane -t " .. pane)
end
end
{ "<leader>cs", send_and_focus_claude, mode = "v" }
-- Works but requires every external terminal user to reimplement this themselves.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels