diff --git a/lua/plugin/code-companion.lua b/lua/plugin/code-companion.lua index 6e524a7..f3e175e 100644 --- a/lua/plugin/code-companion.lua +++ b/lua/plugin/code-companion.lua @@ -3,7 +3,7 @@ require("codecompanion").setup({ chat = { adapter = { name = "copilot", - model = "claude-3.7-sonnet", + model = "claude-sonnet-4", }, }, }, diff --git a/lua/plugins.lua b/lua/plugins.lua index 2518cc6..68be979 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -40,6 +40,10 @@ require("lazy").setup({ lazygit = { enabled = true }, }, }, + { + "MeanderingProgrammer/render-markdown.nvim", + ft = { "markdown", "codecompanion" }, + }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", @@ -104,13 +108,13 @@ require("lazy").setup({ vim.g.db_ui_use_nerd_fonts = 1 end, }, - { - "olimorris/codecompanion.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - } - }, + { + "olimorris/codecompanion.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }, }, opts) 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") require("plugin." .. name) end + diff --git a/lua/remap.lua b/lua/remap.lua index 9a98430..0aaf481 100644 --- a/lua/remap.lua +++ b/lua/remap.lua @@ -29,3 +29,7 @@ vim.keymap.set("n", "tc", ":tabc") -- copy current file path vim.keymap.set("n", "cp", ":let @+ = expand('%')") +-- code companion +vim.keymap.set({"n", "v"}, "cc", ":CodeCompanionChat Toggle") +vim.keymap.set("v", "acc", "CodeCompanionChat Add") +