-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why isn't a prompt buffer used? #379
Comments
This is first time I hear something like prompt-buffer exists :d Sounds like good idea tho because this is precisely what we want to achieve anyway with otu current implementation. |
I tried to directly
The default buftype for |
So I experimented with prompt buffer a bit and my thoughts are: It simplifies a lot of the prompt handling code but being able to only edit 1 line is basically no-go. It makes asking complex questions basically impossible. I was able to solve the quitting issue rather easily tho so thats solvable for sure. I would be for closing this issue as I think the prompt buffer behaviour even though its kinda nice the 1 line thingy is just so bad. EDIT: But when entering insert mode, going to last line is probably fine I guess? As that behaviour is rly nice for sure. But its also probably replicable without prompt buffer |
- Cleanup auto insert behaviour and move it to chat.lua - Add support for moving cursor to end of buffer before entering insert mode in the chat buffer - Cleanup configuration (move yank register config near the mapping) Closes CopilotC-Nvim#379 Signed-off-by: Tomas Slusny <[email protected]>
- Cleanup auto insert behaviour and move it to chat.lua - Add support for moving cursor to end of buffer before entering insert mode in the chat buffer - Cleanup configuration (move yank register config near the mapping) Closes CopilotC-Nvim#379 Signed-off-by: Tomas Slusny <[email protected]>
Yeah it can be replicated. IMO there's no reason to be editing/inserting anywhere but within the current (i.e. bottommost) prompt. So I'd make it so that it takes you there automatically if you are above that section and enter insert mode. You probably don't want to do it if you are already in current prompt section however, as you may be trying to edit earlier lines (not the last one) within the current prompt. But yeah, I think the last column of the last line is the most logical place to put it in this case (you could also get fancy and do other stuff too, but that's the gist). |
- Cleanup auto insert behaviour and move it to chat.lua - Add support for moving cursor to end of buffer before entering insert mode in the chat buffer - Cleanup configuration (move yank register config near the mapping) Closes CopilotC-Nvim#379 Signed-off-by: Tomas Slusny <[email protected]>
One thing I find annoying is that after I scroll up to view the history, entering insert mode then allows me to edit the current line (e.g. history) instead of taking me back to the prompting line/area. It'd be nice if entering insert mode took me back to the current prompt automatically (and IIRC, this is precisely how prompt buffers work in neovim).
Here's my temporary workaround, although there may be a better way to implement this internally (using a prompt buffer (see
:help prompt-buffer
), or, extmarks, etc.):The text was updated successfully, but these errors were encountered: