nvim: copilot and chatgpt
This commit is contained in:
parent
5f0e861fdd
commit
fbdda9d41f
|
|
@ -0,0 +1,3 @@
|
|||
require("chatgpt").setup({
|
||||
api_key_cmd = "pass api/chatgpt_neovim",
|
||||
})
|
||||
|
|
@ -21,15 +21,15 @@ cmp.setup {
|
|||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
--['<Tab>'] = cmp.mapping(function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_next_item()
|
||||
-- elseif luasnip.expand_or_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
--end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
|
|
|
|||
|
|
@ -26,5 +26,18 @@ return require('packer').startup(function(use)
|
|||
use 'lukas-reineke/indent-blankline.nvim'
|
||||
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
use 'github/copilot.vim'
|
||||
|
||||
use({
|
||||
"jackMort/ChatGPT.nvim",
|
||||
config = function()
|
||||
require("chatgpt").setup()
|
||||
end,
|
||||
requires = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim"
|
||||
}
|
||||
})
|
||||
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,11 @@ _G.packer_plugins = {
|
|||
path = "/home/dm/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
|
||||
url = "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
["copilot.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/dm/.local/share/nvim/site/pack/packer/start/copilot.vim",
|
||||
url = "https://github.com/github/copilot.vim"
|
||||
},
|
||||
["gitsigns.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/dm/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
|
||||
|
|
|
|||
Loading…
Reference in New Issue