feat: add suggestion history for NES with restore functionality#40
feat: add suggestion history for NES with restore functionality#40bassamsdata wants to merge 8 commits into
Conversation
|
I haven't yet reviewed this properly but I think the data structure could be simplified with a |
Ah, no matter how much I use Neovim, it still surprises me with things I didn’t know. I’ll check it out. |
|
|
|
Looking forward to this! Is there any further testing you need done? or is this pretty much ready to merge? |
I have been travelling so havent really had time to review it properly. |
|
My fundemental problem with this behaviour is if you have edited the buffer, then restore the suggestion, the edits can be way off... I need to think about this more... |
I haven't looked at how it was implemented here, but when I implemented my own quick hacky solution I cached the original text at time of NES and then invalidated that item if the text was not the same later. So you lose any cache of previous NES items if the file changed in a way that effects the location / text content of the cached NES items. Thoughts? |
Adds history storage for the last 2 NES suggestions with ability to restore and cycle through them.
Direct fix for #36
Changes:
restore_suggestion()function to cycle through historyUsage:
require("copilot-lsp.nes").restore_suggestion()to cycle through previous suggestionsThank you
Screen.Recording.2025-06-02.at.11.38.34.AM.mp4