From f561b168062570637d167d85bdc5b3e1632a0aca Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 10 Apr 2025 08:24:30 -0400 Subject: [PATCH] adding new ai --- lua/cargdev/plugins/aicargdev.lua | 55 +++++++++++++++++++++++++++++++ lua/cargdev/plugins/copilot.lua | 1 + 2 files changed, 56 insertions(+) create mode 100644 lua/cargdev/plugins/aicargdev.lua diff --git a/lua/cargdev/plugins/aicargdev.lua b/lua/cargdev/plugins/aicargdev.lua new file mode 100644 index 0000000..0ddbb82 --- /dev/null +++ b/lua/cargdev/plugins/aicargdev.lua @@ -0,0 +1,55 @@ +return { + { + "yetone/avante.nvim", + event = "VeryLazy", + lazy = false, + version = false, -- Always pull the latest change + opts = { + provider = "cargdev", -- API provider configuration + vendors = { + cargdev = { + name = "cargdev", -- Optional + endpoint = "http://api.ai.cargdev.io/api/generate", + api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below + model = "deepseek-r1:latest", + __inherited_from = "ollama", -- ensures compatibility + max_tokens = 8192, + }, + }, + }, + -- Optional: Build from source if required + build = "make", + dependencies = { + "nvim-treesitter/nvim-treesitter", -- Syntax highlighting support + "stevearc/dressing.nvim", -- UI elements + "nvim-lua/plenary.nvim", -- Utility library + "MunifTanjim/nui.nvim", -- UI library for modal components + -- Optional dependencies: + "nvim-tree/nvim-web-devicons", -- Icons support + "zbirenbaum/copilot.lua", -- Copilot integration + { + "HakonHarnes/img-clip.nvim", -- Image pasting support + event = "VeryLazy", + opts = { + -- Recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + use_absolute_path = true, -- For Windows users + }, + }, + }, + { + "MeanderingProgrammer/render-markdown.nvim", -- Render markdown support + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, + }, +} + diff --git a/lua/cargdev/plugins/copilot.lua b/lua/cargdev/plugins/copilot.lua index 0925e4a..cebfe89 100644 --- a/lua/cargdev/plugins/copilot.lua +++ b/lua/cargdev/plugins/copilot.lua @@ -1,6 +1,7 @@ return { "github/copilot.vim", lazy = false, -- Force load on startup + enabled = false, config = function() vim.g.copilot_no_tab_map = true -- Disable default Tab mapping vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { expr = true, silent = true })