diff --git a/.config/nvim/lua/plugins/codecompanion.lua b/.config/nvim/lua/plugins/codecompanion.lua new file mode 100644 index 0000000..02c62df --- /dev/null +++ b/.config/nvim/lua/plugins/codecompanion.lua @@ -0,0 +1,48 @@ +return { + "olimorris/codecompanion.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + opts = { + strategies = { + -- Change the default chat adapter + chat = { + adapter = "ollama", + }, + inline = { + adapter = "ollama", + } + }, + adapters = { + ollama = function() + return require("codecompanion.adapters").extend("ollama", { + name = "qwen2.5-coder:latest", + env = { + url = "http://192.168.10.99:11434", + api_key = "OLLAMA_API_KEY", + }, + headers = { + ["Content-Type"] = "application/json", + ["Authorization"] = "Bearer ${api_key}", + }, + parameters = { + sync = true, + }, + schema = { + model = { + default = "qwen2.5-coder:latest", + }, + num_ctx = { + default = 16384, + }, + } + }) + end, + }, + opts = { + -- Set debug logging + log_level = "DEBUG", + }, + }, +} diff --git a/.config/nvim/lua/plugins/replace.lua b/.config/nvim/lua/plugins/replace.lua new file mode 100644 index 0000000..bacb619 --- /dev/null +++ b/.config/nvim/lua/plugins/replace.lua @@ -0,0 +1,3 @@ +return { + 'tpope/vim-abolish' +}