coder / coder/claudecode.nvim

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

Aperta
#77 3 commenti 7 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Lua
Stelle
3.1k
Fork
216
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia individuando l’implementazione dell’input della chat e la relativa associazione codificata per la cancellazione con . Aggiungi un tasto di cancellazione configurabile, quindi verifica che possa uscire dalla modalità inserimento mentre il tasto configurato annulla la richiesta; l’issue non indica alcun file o test specifico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
lua
Ambito
tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.