applied code companion

This commit is contained in:
Andre Schaf 2025-10-27 15:01:25 +01:00
parent afcf5f92e7
commit ad2f7805d1
3 changed files with 17 additions and 8 deletions

View file

@ -3,7 +3,7 @@ require("codecompanion").setup({
chat = { chat = {
adapter = { adapter = {
name = "copilot", name = "copilot",
model = "claude-3.7-sonnet", model = "claude-sonnet-4",
}, },
}, },
}, },

View file

@ -40,6 +40,10 @@ require("lazy").setup({
lazygit = { enabled = true }, lazygit = { enabled = true },
}, },
}, },
{
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "codecompanion" },
},
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate", build = ":TSUpdate",
@ -104,13 +108,13 @@ require("lazy").setup({
vim.g.db_ui_use_nerd_fonts = 1 vim.g.db_ui_use_nerd_fonts = 1
end, end,
}, },
{ {
"olimorris/codecompanion.nvim", "olimorris/codecompanion.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
} },
}, },
}, opts) }, opts)
local files = vim.split(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/plugin", "*.lua", true), "\n") local files = vim.split(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/plugin", "*.lua", true), "\n")
@ -119,3 +123,4 @@ for _, f in ipairs(files) do
local name = vim.fn.fnamemodify(f, ":t:r") local name = vim.fn.fnamemodify(f, ":t:r")
require("plugin." .. name) require("plugin." .. name)
end end

View file

@ -29,3 +29,7 @@ vim.keymap.set("n", "<leader>tc", ":tabc<CR>")
-- copy current file path -- copy current file path
vim.keymap.set("n", "<leader>cp", ":let @+ = expand('%')<CR>") vim.keymap.set("n", "<leader>cp", ":let @+ = expand('%')<CR>")
-- code companion
vim.keymap.set({"n", "v"}, "<leader>cc", ":CodeCompanionChat Toggle<CR>")
vim.keymap.set("v", "<leader>acc", "<cmd>CodeCompanionChat Add<cr>")