Skip to content

Commit 21f00df

Browse files
author
Bassam Data
committed
docs: update the readme with the history feature
1 parent 8955136 commit 21f00df

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ vim.keymap.set("n", "<esc>", function()
5353
end, { desc = "Clear Copilot suggestion or fallback" })
5454
```
5555

56+
57+
#### Restoring previous suggestions
58+
59+
The history automatically stores the last 2 suggestions. Each time you call restore, it cycles to the next previous suggestion. When you reach the end, it wraps back to the most recent one.
60+
61+
You can restore and cycle through the last 2 suggestions:
62+
```lua
63+
-- Restore previous suggestions (cycles through last 2)
64+
vim.keymap.set("n", "<leader>cr", function()
65+
require('copilot-lsp.nes').restore_suggestion()
66+
end, { desc = "Restore previous Copilot suggestion" })
67+
```
68+
69+
5670
## Default Configuration
5771

5872

0 commit comments

Comments
 (0)