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:
Martin Larsson 2024-09-22 14:00:02 +02:00
parent 9d63c7b0a5
commit a55f39f71d
2 changed files with 36 additions and 1 deletions

View 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
}

View file

@ -1,4 +1,3 @@
return { return {
"github/copilot.vim", "github/copilot.vim",
event = "InsertEnter",
} }