diff --git a/lua/taken/plugins/ai.lua b/lua/taken/plugins/ai.lua new file mode 100644 index 0000000..0c77185 --- /dev/null +++ b/lua/taken/plugins/ai.lua @@ -0,0 +1,78 @@ +--- @type LazyPluginSpec[] +return { + { + "NickvanDyke/opencode.nvim", + dependencies = { "folke/snacks.nvim" }, + config = function() + require("opencode").setup() + end, + -- stylua: ignore + keys = { + { 'aot', function() require('opencode').toggle() end, desc = 'Toggle embedded opencode', }, + { 'aoa', function() require('opencode').ask() end, desc = 'Ask opencode', mode = 'n', }, + { 'aoa', function() require('opencode').ask('@selection: ') end, desc = 'Ask opencode about selection', mode = 'v', }, + { 'aop', function() require('opencode').select_prompt() end, desc = 'Select prompt', mode = { 'n', 'v', }, }, + { 'aon', function() require('opencode').command('session_new') end, desc = 'New session', }, + { 'aoy', function() require('opencode').command('messages_copy') end, desc = 'Copy last message', }, + { '', function() require('opencode').command('messages_half_page_up') end, desc = 'Scroll messages up', }, + { '', function() require('opencode').command('messages_half_page_down') end, desc = 'Scroll messages down', }, + }, + }, + { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, + build = "make", + enabled = false, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + "nvim-telescope/telescope.nvim", + "nvim-tree/nvim-web-devicons", + "zbirenbaum/copilot.lua", + "ravitemer/mcphub.nvim", + }, + config = function() + require("avante").setup({ + provider = "copilot", + system_prompt = function() + local hub = require("mcphub").get_hub_instance() + return hub:get_active_servers_prompt() + end, + custom_tools = function() + return { + require("mcphub.extensions.avante").mcp_tool(), + } + end, + }) + end, + }, + { + "ravitemer/mcphub.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + cmd = "MCPHub", + build = "bundled_build.lua", + enabled = false, + init = function() + local mcphublocation = vim.fn.expand("~/.config/mcphub") + + if vim.fn.isdirectory(mcphublocation) == 0 then + vim.fn.system("mkdir -p " .. mcphublocation) + end + end, + config = function() + require("mcphub").setup({ + extensions = { + avante = { + make_slash_commands = true, + }, + }, + use_bundled_binary = true, + }) + end, + }, +} diff --git a/lua/taken/plugins/avante.lua b/lua/taken/plugins/avante.lua deleted file mode 100644 index 315974e..0000000 --- a/lua/taken/plugins/avante.lua +++ /dev/null @@ -1,31 +0,0 @@ ---- @type LazyPluginSpec -return { - "yetone/avante.nvim", - event = "VeryLazy", - version = false, - build = "make", - dependencies = { - "nvim-treesitter/nvim-treesitter", - "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - "nvim-telescope/telescope.nvim", - "nvim-tree/nvim-web-devicons", - "zbirenbaum/copilot.lua", - "ravitemer/mcphub.nvim", - }, - config = function() - require("avante").setup({ - provider = "copilot", - system_prompt = function() - local hub = require("mcphub").get_hub_instance() - return hub:get_active_servers_prompt() - end, - custom_tools = function() - return { - require("mcphub.extensions.avante").mcp_tool(), - } - end, - }) - end, -} diff --git a/lua/taken/plugins/mcphub.lua b/lua/taken/plugins/mcphub.lua deleted file mode 100644 index d0c6a19..0000000 --- a/lua/taken/plugins/mcphub.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- @type LazyPluginSpec -return { - "ravitemer/mcphub.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - cmd = "MCPHub", - build = "bundled_build.lua", - init = function() - local mcphublocation = vim.fn.expand("~/.config/mcphub") - - if vim.fn.isdirectory(mcphublocation) == 0 then - vim.fn.system("mkdir -p " .. mcphublocation) - end - end, - config = function() - require("mcphub").setup({ - extensions = { - avante = { - make_slash_commands = true, - }, - }, - use_bundled_binary = true, - }) - end, -}