feat(nvim): add copilot config
This commit is contained in:
parent
adb2caacb8
commit
15de473108
21
nvimrc
21
nvimrc
|
@ -639,9 +639,27 @@ require'treesitter-context'.setup{
|
||||||
}
|
}
|
||||||
EOF
|
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:
|
" nvim-cmp:
|
||||||
|
|
||||||
packadd! nvim-cmp " https://github.com/hrsh7th/nvim-cmp.git
|
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! vim-vsnip " https://github.com/hrsh7th/vim-vsnip.git
|
||||||
packadd! cmp-vsnip " https://github.com/hrsh7th/cmp-vsnip.git
|
packadd! cmp-vsnip " https://github.com/hrsh7th/cmp-vsnip.git
|
||||||
packadd! cmp-nvim-lsp " https://github.com/hrsh7th/cmp-nvim-lsp.git
|
packadd! cmp-nvim-lsp " https://github.com/hrsh7th/cmp-nvim-lsp.git
|
||||||
|
@ -672,6 +690,7 @@ lua <<EOF
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'copilot' },
|
||||||
{
|
{
|
||||||
name = 'buffer',
|
name = 'buffer',
|
||||||
option = {
|
option = {
|
||||||
|
@ -740,6 +759,8 @@ local on_attach = function(client, bufnr)
|
||||||
require 'lsp_signature'.on_attach({
|
require 'lsp_signature'.on_attach({
|
||||||
hint_enable = false,
|
hint_enable = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require 'copilot_cmp'.setup();
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Go
|
-- Go
|
||||||
|
|
Loading…
Reference in New Issue