feat(nvim): add copilot config

This commit is contained in:
Rob Watson 2023-09-17 07:32:54 +02:00 committed by Rob Watson
parent adb2caacb8
commit 15de473108
1 changed files with 21 additions and 0 deletions

21
nvimrc
View File

@ -639,9 +639,27 @@ require'treesitter-context'.setup{
}
EOF
" copilot:
packadd! copilot.lua " https://github.com/zbirenbaum/copilot.lua.git
lua <<EOF
vim.defer_fn(function()
require('copilot').setup({
panel = {
enabled = false,
},
suggestion = {
enabled = false,
},
})
end, 100)
EOF
" nvim-cmp:
packadd! nvim-cmp " https://github.com/hrsh7th/nvim-cmp.git
packadd! copilot-cmp " https://github.com/zbirenbaum/copilot-cmp.git
packadd! vim-vsnip " https://github.com/hrsh7th/vim-vsnip.git
packadd! cmp-vsnip " https://github.com/hrsh7th/cmp-vsnip.git
packadd! cmp-nvim-lsp " https://github.com/hrsh7th/cmp-nvim-lsp.git
@ -672,6 +690,7 @@ lua <<EOF
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'copilot' },
{
name = 'buffer',
option = {
@ -740,6 +759,8 @@ local on_attach = function(client, bufnr)
require 'lsp_signature'.on_attach({
hint_enable = false,
})
require 'copilot_cmp'.setup();
end
-- Go