Skip to content

Commit 2c4959d

Browse files
committed
Add notice that getPanelCompletions is no longer recommended + update defaults in README
1 parent 2bd8d80 commit 2c4959d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following is the default configuration:
6868
```lua
6969
cmp = {
7070
enabled = true,
71-
method = "getPanelCompletions",
71+
method = "getCompletionsCycling",
7272
},
7373
panel = { -- no config options yet
7474
enabled = true,
@@ -80,9 +80,10 @@ server_opts_overrides = {},
8080

8181
##### cmp
8282

83-
Set the enabled field to false if you do not wish to see copilot recommendations in nvim-cmp. Set the `method` field to `getCompletionsCycling` if you are having issues. getPanelCompletions seems to work just as quickly, and does not limit completions in the cmp menu to 3 recommendations. getPanelCompletions also allows for the comparator provided in copilot-cmp to not just place all copilot completions on top, but also sort them by the `score` copilot assigns them, which is not provided by getCompletionsCycling. Example:
83+
Set the enabled field to false if you do not wish to see copilot recommendations in nvim-cmp. Set the `method` field to `getCompletionsCycling` if you are having issues. getPanelCompletions previously worked just as quickly, and did not limit completions in the cmp menu to 3 recommendations, but has become so slow completions do not seem to appear due to recent changes from Microsoft. getPanelCompletions also allows for the comparator provided in copilot-cmp to not just place all copilot completions on top, but also sort them by the `score` copilot assigns them, which is not provided by getCompletionsCycling. Example:
8484

8585
```lua
86+
-- Recommended
8687
require("copilot").setup {
8788
cmp = {
8889
enabled = true,
@@ -91,6 +92,16 @@ require("copilot").setup {
9192
},
9293
```
9394

95+
```lua
96+
-- Not Currently Recommended
97+
require("copilot").setup {
98+
cmp = {
99+
enabled = true,
100+
method = "getPanelCompletions",
101+
}
102+
},
103+
```
104+
94105
##### panel
95106

96107
Enabling panel creates the `CopilotPanel` command, which allows you to preview completions in a split window. Navigating to the split window allows you to jump between them and see each one. (<CR> to accept completion not yet implemented, coming soon)

0 commit comments

Comments
 (0)