coder / coder/claudecode.nvim

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

Đang mở
#77 3 bình luận 7 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Lua
Star
3.1k
Fork
216
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần triển khai đầu vào chat và ánh xạ hủy được hardcode bằng . Thêm một phím hủy có thể cấu hình, sau đó xác minh rằng có thể thoát khỏi chế độ chèn, trong khi phím đã cấu hình sẽ hủy request; issue không nêu tên file hoặc test cụ thể nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua
Lĩnh vực
tooling
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.