Skip to content

feat: add show_terminal_on_at_mention configuration option #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

John-Lin
Copy link

Summary

This PR adds a new configuration option show_terminal_on_at_mention to 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

  • New config option: show_terminal_on_at_mention (boolean, defaults to true)
  • Conditional terminal display: Terminal is only shown/opened when the option is enabled
  • Backward compatibility: Existing behavior is preserved by default
  • Config validation: Added validation for the new boolean option

@ThomasK33
Copy link
Member

Hey @John-Lin, thanks for opening this PR.

Another PR is currently open that proposes adding an external (to be renamed to none) provider, which will turn any terminal provider interaction into a noop. This way, you should be able to set the terminal provider to none, and we wouldn't need this boolean config option.

Assuming you'd configure that terminal provider to be none, you could launch Claude Code in a terminal multiplexer of your choice using claude --ide, and it should automatically connect.

- 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>
@John-Lin John-Lin force-pushed the feat/show-terminal-on-at-mention branch from e24d0db to 3155f16 Compare July 30, 2025 15:47
@John-Lin
Copy link
Author

Hi, @ThomasK33 Thank you for your feedback! I think the idea of the none provider is great. Thanks to the integration between this plugin and /ide, it allows us to work in our preferred terminal multiplexer.

@John-Lin
Copy link
Author

John-Lin commented Jul 30, 2025

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,
  },
})

@ThomasK33
Copy link
Member

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 none provider myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants