mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 14:37:15 +01:00
add copilot
This commit is contained in:
@@ -2,12 +2,19 @@ vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
vim.opt.shortmess:append 'c'
|
||||
|
||||
local lspkind = require 'lspkind'
|
||||
lspkind.init {}
|
||||
lspkind.init {
|
||||
symbol_map = {
|
||||
Copilot = '',
|
||||
},
|
||||
mode = 'symbol',
|
||||
}
|
||||
vim.api.nvim_set_hl(0, 'CmpItemKindCopilot', { fg = '#6CC644' })
|
||||
|
||||
local cmp = require 'cmp'
|
||||
|
||||
cmp.setup {
|
||||
sources = {
|
||||
{ name = 'copilot' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
|
||||
@@ -11,6 +11,7 @@ return {
|
||||
{ 'L3MON4D3/LuaSnip', build = 'make install_jsregexp' },
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'rafamadriz/friendly-snippets',
|
||||
'zbirenbaum/copilot-cmp',
|
||||
},
|
||||
config = function()
|
||||
require 'completion'
|
||||
|
||||
17
lua/plugins/copilot.lua
Normal file
17
lua/plugins/copilot.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
event = 'InsertEnter',
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
'zbirenbaum/copilot-cmp',
|
||||
config = function()
|
||||
require('copilot_cmp').setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user