coder / coder/claudecode.nvim

[FEATURE] Make chat input cancel key configurable instead of forcing <Esc> to cancel

オープン
#77 コメント 3 件 リアクション 7 件 担当者 0 名 GitHub で見る
主要言語
Lua
スター
3.1k
フォーク
216
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。