Replies: 1 comment
-
PR implementing suggested change: #148 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Loving this plugin, but using it with
set hidden
is rather frustrating.I use a keymap to toggle the chat window on/off. While I'm working in neovim, this is fantastic. However anytime I try to close neovim, I get the error
No write since last change
which forces me to force quit with:q!
.I often close neovim with the
:wqa
command and that will also fail because the chat plugin is perpetually in a modified state (by design i think).The closing behavior is a trivial fix if I can make the chat buffer
nofile
. E.g. with a keymap like so:This works great for not getting the error upon quitting, but it completely breaks chat, because chat relies on sending
:w
to the buffer in order to send to the LLM. See the implementation of keymaps like<cr>
or<C-s>
found here.I believe this is trivially fixable since the callback has a chat object as a parameter, and the implementation of the autocmd for
BufWriteCmd
is simplychat:submit()
found hereBy decoupling submission from
BufWriteCmd
we can let users have more control over the behavior of the buffer, and better supportset hidden
.I implemented the trivial fix locally and it seems to work (see draft PR linked below).
An interesting follow-up would be supporting
nofile
as a first class feature in settings.Beta Was this translation helpful? Give feedback.
All reactions