Skip to content

Commit 3d3f6a3

Browse files
committed
BREAKING CHANGE: View README for updated setup
1 parent 8d9cc34 commit 3d3f6a3

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ use {
6666
The following is the default configuration:
6767

6868
```lua
69-
cmp = {
70-
enabled = true,
71-
method = "getCompletionsCycling",
72-
},
7369
panel = { -- no config options yet
7470
enabled = true,
7571
},
@@ -79,30 +75,6 @@ plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
7975
server_opts_overrides = {},
8076
```
8177

82-
##### cmp
83-
84-
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:
85-
86-
```lua
87-
-- Recommended
88-
require("copilot").setup {
89-
cmp = {
90-
enabled = true,
91-
method = "getCompletionsCycling",
92-
}
93-
},
94-
```
95-
96-
```lua
97-
-- Not Currently Recommended
98-
require("copilot").setup {
99-
cmp = {
100-
enabled = true,
101-
method = "getPanelCompletions",
102-
}
103-
},
104-
```
105-
10678
##### panel
10779

10880
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)

lua/copilot/init.lua

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
local M = { client_info = nil }
22
local client = require("copilot.client")
33
local defaults = {
4-
cmp = {
5-
enabled = true,
6-
method = "getCompletionsCycling",
7-
autofmt = true,
8-
},
94
panel = { -- no config options yet
105
enabled = true,
116
},
@@ -46,10 +41,6 @@ M.setup = function(opts)
4641
vim.schedule(function ()
4742
client.start(user_config)
4843

49-
if user_config.cmp.enabled then
50-
require("copilot_cmp").setup(user_config.cmp)
51-
end
52-
5344
if user_config.panel.enabled then
5445
create_cmds(user_config)
5546
end

0 commit comments

Comments
 (0)