A Gitlab Duo Adapter for CodeCompanion.nvim
- Neovim >= 0.8.0
- codecompanion.nvim
vim.pack.add({
"https://github.com/olimorris/codecompanion.nvim",
"https://github.com/Kraust/codecompanion-gitlab.nvim",
})
require("codecompanion").setup({
opts = {
language = "English",
system_prompt = "",
},
strategies = {
chat = {
adapter = "gitlab_duo",
roles = {
llm = function(adapter)
return "CodeCompanion (" .. adapter.formatted_name .. ")"
end,
user = "Me",
},
keymaps = {
submit = {
modes = { n = "<CR>" },
description = "Submit",
callback = function(chat)
chat:submit()
end,
},
},
},
inline = {
adapter = "gitlab_duo",
},
},
adapters = {
gitlab_duo = function()
return require("codecompanion-gitlab.adapters.gitlab_duo")
end,
},
})GITLAB_API_KEY- Your Gitlab Personal Access TokenGITLAB_URL- The URL to your Gitlab Instance (e.g.http://gitlab.my.domain:1235/)