feat: add show_terminal_on_at_mention configuration option#90
feat: add show_terminal_on_at_mention configuration option#90John-Lin wants to merge 1 commit intocoder:mainfrom
Conversation
|
Hey @John-Lin, thanks for opening this PR. Another PR is currently open that proposes adding an Assuming you'd configure that terminal provider to be |
- Add new config option to control terminal visibility for @ mentions - Remove show_terminal parameter from send_at_mention function - Update config validation to include new boolean option - Simplify visual selection @ mention calls 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
e24d0db to
3155f16
Compare
|
Hi, @ThomasK33 Thank you for your feedback! I think the idea of the |
|
I just saw that the custom terminal provider feature #91 has been merged . I think I can config a noop custom provider to achieve this functionality, at least until the changes in #50 are merged to upstream. Here is the example for noop custom provider. local noop_terminal_provider = {
setup = function(config)
-- Do nothing - just store config if needed
end,
open = function(cmd_string, env_table, effective_config, focus)
-- Do nothing - no terminal to open
end,
close = function()
-- Do nothing - no terminal to close
end,
simple_toggle = function(cmd_string, env_table, effective_config)
-- Do nothing - no terminal to toggle
end,
focus_toggle = function(cmd_string, env_table, effective_config)
-- Do nothing - no terminal to focus/hide
end,
get_active_bufnr = function()
-- Return nil since there's no terminal buffer
return nil
end,
is_available = function()
-- Always available since it does nothing
return true
end,
-- Optional function
toggle = function(cmd_string, env_table, effective_config)
-- Do nothing - no terminal to toggle
end,
_get_terminal_for_test = function()
-- For testing only - return nil
return nil
end,
}
require("claudecode").setup({
terminal = {
provider = noop_terminal_provider,
},
}) |
|
It's good to know that the external provider works as an interim solution. I will wait a week for PR #50 to be refactored before I push a |
Summary
This PR adds a new configuration option
show_terminal_on_at_mentionto allow users to disable automatic terminal visibility when sending @ mentions to Claude.Motivation
Some users prefer to manage terminal sessions externally using tools like Ghostty, Tmux, or other terminal multiplexers. For these workflows, automatically opening/showing the terminal split in Neovim when sending @ mentions can be disruptive to their preferred window management setup.
Changes
show_terminal_on_at_mention(boolean, defaults to true)