-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(completion): add
copilot-cmp
(#967)
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# copilot.lua within CMP | ||
|
||
Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot | ||
|
||
**Repositories:** | ||
<https://github.com/zbirenbaum/copilot.lua> | ||
<https://github.com/zbirenbaum/copilot-cmp> | ||
|
||
_Note_: This plugin will also reconfigure `cmp` and add `copilot` as a completion source | ||
_Note 2_: This configuration adds a nerdfont icon for copilot using `lspkind`. If you are using regular characters, you can change it in your plugin setup, using the key `Copilot` for `lspkind`'s `buffer_map` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
---@type LazySpec | ||
return { | ||
{ | ||
"zbirenbaum/copilot.lua", | ||
opts = { | ||
suggestion = { enabled = false }, | ||
panel = { enabled = false }, | ||
}, | ||
}, | ||
{ "zbirenbaum/copilot-cmp", opts = {}, dependencies = { "zbirenbaum/copilot.lua" } }, | ||
{ | ||
"hrsh7th/nvim-cmp", | ||
dependencies = { "zbirenbaum/copilot-cmp" }, | ||
opts = function(_, opts) | ||
-- Inject copilot into cmp sources, with high priority | ||
table.insert(opts.sources, 1, { | ||
name = "copilot", | ||
group_index = 1, | ||
priority = 10000, | ||
}) | ||
end, | ||
}, | ||
{ | ||
"onsails/lspkind.nvim", | ||
optional = true, | ||
-- Adds icon for copilot using lspkind | ||
opts = function(_, opts) opts.symbol_map.Copilot = "" end, | ||
}, | ||
} |