added copilot to cmp
This commit is contained in:
parent
e835520de0
commit
cf05586a00
@ -10,38 +10,18 @@ return {
|
|||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
'onsails/lspkind.nvim',
|
'onsails/lspkind.nvim',
|
||||||
|
'zbirenbaum/copilot-cmp',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
local lspkind = require('lspkind')
|
local lspkind = require('lspkind')
|
||||||
|
lspkind.init({
|
||||||
|
symbol_map = {
|
||||||
|
Copilot = '',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require('copilot_cmp').setup()
|
||||||
|
|
||||||
local kind_icons = {
|
|
||||||
Text = '',
|
|
||||||
Method = '',
|
|
||||||
Function = '',
|
|
||||||
Constructor = '',
|
|
||||||
Field = '',
|
|
||||||
Variable = '',
|
|
||||||
Class = '',
|
|
||||||
Interface = '',
|
|
||||||
Module = '',
|
|
||||||
Property = '',
|
|
||||||
Unit = '',
|
|
||||||
Value = '',
|
|
||||||
Enum = '',
|
|
||||||
Keyword = '',
|
|
||||||
Snippet = '',
|
|
||||||
Color = '',
|
|
||||||
File = '',
|
|
||||||
Reference = '',
|
|
||||||
Folder = '',
|
|
||||||
EnumMember = '',
|
|
||||||
Constant = '',
|
|
||||||
Struct = '',
|
|
||||||
Event = '',
|
|
||||||
Operator = '',
|
|
||||||
TypeParameter = '',
|
|
||||||
}
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
@ -61,9 +41,9 @@ return {
|
|||||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'copilot' },
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' }, -- For luasnip users.
|
{ name = 'luasnip' }, -- For luasnip users.
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
}),
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user