Add code companion plugin and configure it to use Copilot on all
accounts as that is promitted to use at work. Since it's using the official Copilot plugin we can be sure that the token is using whatever is authorized.
This commit is contained in:
parent
9d63c7b0a5
commit
a55f39f71d
2 changed files with 36 additions and 1 deletions
36
home/.config/nvim/lua/plugs/codecompanion.lua
Normal file
36
home/.config/nvim/lua/plugs/codecompanion.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"hrsh7th/nvim-cmp",
|
||||
{ 'echasnovski/mini.diff', version = false },
|
||||
{ "stevearc/dressing.nvim", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
require("codecompanion").setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
inline = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
agent = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
},
|
||||
adapters = {
|
||||
copilot = function() return require("codecompanion.adapters").extend("copilot", {}) end,
|
||||
},
|
||||
display = {
|
||||
diff = {
|
||||
provider = "mini_diff",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
log_level = "DEBUG",
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
return {
|
||||
"github/copilot.vim",
|
||||
event = "InsertEnter",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue