[FEATURE] Make chat input cancel key configurable instead of forcing <Esc> to cancel
- 主要语言
- Lua
- 星标
- 3.1k
- 派生
- 217
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Feature Description
Allow customizing which key cancels the chat input in claudecode.nvim, rather than hardcoding `` to cancel. Ideally, `` could be used to leave insert mode and enter normal mode in the chat input buffer.
---
## Use Case
Currently, pressing `` in the chat input window cancels the request entirely, which makes it impossible to switch from insert mode to normal mode in the input. Many Neovim users expect `` to leave insert mode and allow normal-mode editing operations (like moving the cursor, deleting words, etc.) inside the buffer.
This feature would make the chat input behave like any other Neovim buffer and avoid accidental cancellations when trying to exit insert mode.
---
## Proposed Solution
Add a plugin option such as:
```lua
opts = {
cancel_key = "",
}
```
Then use this key to trigger cancellation instead of always binding ``.
Alternatively, allow `` to switch to normal mode, and only cancel the chat if the user explicitly types another command to close it.
---
## Alternatives Considered
* Patching the plugin manually to change the `` mapping.
* Avoiding insert mode entirely in the chat input, but this is impractical for normal usage.
* Using a different plugin, but claudecode.nvim fits my workflow best.
---
## Additional Context
Other AI plugins like Copilot Chat and ChatGPT Neovim allow normal-mode editing inside their input buffers, which improves usability. Bringing similar behavior to claudecode.nvim would make the chat experience smoother for Vim users.
Thanks for considering this!
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位聊天输入的实现及其硬编码的 取消映射。添加可配置的取消键,然后验证 可以退出插入模式,而配置的按键可以取消请求;该 issue 未指定具体的文件或测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100