-- You can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information return { { 'joaodubas/gitlinker.nvim', config = function() local actions = require 'gitlinker.actions' local hosts = require 'gitlinker.hosts' require('gitlinker').setup { opts = { remote = 'origin', add_current_line_on_normal_mode = true, action_callback = actions.copy_to_clipboard, print_url = true, }, callbacks = { ['github.com'] = hosts.get_github_type_url, ['bitbucket.org'] = hosts.get_bitbucket_type_url, ['gitea.dubas.dev'] = hosts.get_gitea_type_url, }, mappings = 'gy', } end, }, { 'NeogitOrg/neogit', dependencies = { 'nvim-lua/plenary.nvim', 'sindrets/diffview.nvim', 'nvim-telescope/telescope.nvim', }, opts = { git_services = { ['gitea.dubas.dev'] = 'https://gitea.dubas.dev/${owner}/${repository}/compare/${branch_name}', }, }, keys = { { 'gs', 'Neogit', desc = 'Git status' }, }, }, 'nvim-treesitter/nvim-treesitter-context', { 'kevinhwang91/nvim-ufo', dependencies = { 'kevinhwang91/promise-async' }, event = 'BufRead', keys = function() local ufo = require 'ufo' return { { 'zR', ufo.openAllFolds, { desc = 'Open all folds' } }, { 'zM', ufo.closeAllFolds, { desc = 'Close all folds' } }, { 'zr', ufo.openFoldsExceptKinds, { desc = 'Open fold' } }, { 'zm', ufo.closeFoldsWith, { desc = 'Close fold' } }, } end, opts = function() local handler = function(virtText, lnum, endLnum, width, truncate) local newVirtText = {} local suffix = (' 󰁂 %d '):format(endLnum - lnum) local sufWidth = vim.fn.strdisplaywidth(suffix) local targetWidth = width - sufWidth local curWidth = 0 for _, chunk in ipairs(virtText) do local chunkText = chunk[1] local chunkWidth = vim.fn.strdisplaywidth(chunkText) if targetWidth > curWidth + chunkWidth then table.insert(newVirtText, chunk) else chunkText = truncate(chunkText, targetWidth - curWidth) local hlGroup = chunk[2] table.insert(newVirtText, { chunkText, hlGroup }) chunkWidth = vim.fn.strdisplaywidth(chunkText) -- str width returned from truncate() may less than 2nd argument, need padding if curWidth + chunkWidth < targetWidth then suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth) end break end curWidth = curWidth + chunkWidth end table.insert(newVirtText, { suffix, 'MoreMsg' }) return newVirtText end return { fold_virt_text_handler = handler, provider_selector = function(_, _, _) return { 'treesitter', 'indent' } end, } end, }, { 'stevearc/oil.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, keys = { { '-', 'Oil', desc = 'Open parent directory' }, }, opts = {}, }, { 'vhyrro/luarocks.nvim', priority = 1000, config = true, }, { 'jpalardy/vim-slime', init = function() vim.g.slime_target = 'tmux' vim.g.slime_no_mappings = true end, keys = { { 'xr', 'SlimeMotionSend', mode = 'n', desc = 'Slime send motion' }, { 'xz', ":'<,'>SlimeSend", mode = 'v', desc = 'Slime send currently highlighted text' }, { 'xz', 'SlimeLineSend', mode = 'n', desc = 'Slime send line' }, { 'xc', 'SlimeConfig', mode = 'n', desc = 'Slime configuration' }, }, config = function() vim.g.slime_input_pid = false vim.g.slime_suggest_default = true vim.g.slime_menu_config = false vim.g.slime_neovim_ignore_unlisted = false vim.g.slime_bracketed_paste = true end, }, { 'ravitemer/mcphub.nvim', dependencies = { 'nvim-lua/plenary.nvim', }, cmd = 'MCPHub', build = 'bundled_build.lua', opts = { port = 37373, config = vim.fn.expand '~/.config/mcphub/servers.json', native_servers = {}, auto_approve = true, auto_toggle_mcp_servers = true, extensions = {}, ui = { window = { width = 0.8, height = 0.8, relative = 'editor', zindex = 50, border = 'rounded', }, wo = {}, }, use_bundled_binary = true, log = { level = vim.log.levels.WARN, prefix = '[MCPHub]', }, }, }, { 'Davidyz/VectorCode', dependencies = { 'nvim-lua/plenary.nvim', }, version = vim.fn.system { 'mise', 'current', 'pipx:vectorcode' }, opts = function() return { async_opts = { debounce = 10, events = { 'BufWritePost', 'InsertEnter', 'BufReadPost' }, exclude_this = true, n_query = 1, notify = false, query_cb = require('vectorcode.utils').make_surrounding_lines_cb(-1), run_on_register = false, }, async_backend = 'default', exclude_this = true, n_query = 1, notify = true, timeout_ms = 5000, on_setup = { update = false, lsp = false, }, sync_log_env_var = false, } end, }, { 'olimorris/codecompanion.nvim', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter', { 'MeanderingProgrammer/render-markdown.nvim', opts = { file_types = { 'markdown', 'codecompanion' }, }, ft = { 'markdown', 'codecompanion' }, }, }, opts = function() return { display = { action_palette = { width = 95, height = 15, prompt = 'Prompt', provide = 'telescope', }, }, adapters = { gemini_pro = function() return require('codecompanion.adapters').extend('gemini', { name = 'gemini_pro', schema = { model = { default = 'gemini-2.5-pro-preview-05-06', }, }, }) end, gemini_flash = function() return require('codecompanion.adapters').extend('gemini', { name = 'gemini_flash', schema = { model = { default = 'gemini-2.0-flash', }, }, }) end, }, extensions = { vectorcode = { opts = { add_tool = true, add_slash_command = true, tool_opts = {}, }, }, mcphub = { callback = 'mcphub.extensions.codecompanion', opts = { make_slash_commands = true, make_vars = true, show_result_in_chat = true, }, }, }, strategies = { chat = { adapter = 'gemini_pro' }, inline = { adapter = 'gemini_flash' }, }, } end, keys = { { 'aa', 'CodeCompanionActions', mode = { 'n', 'v' }, desc = 'CodeCompaion actions', noremap = true, silent = true, }, { 'at', 'CodeCompanionChat Toggle', mode = { 'n', 'v' }, desc = 'CodeCompanion toggle chat', noremap = true, silent = true, }, { 'ga', 'CodeCompanionChat add', mode = 'v', desc = 'CodeCompanion add to chat', noremap = true, silent = true, }, }, }, { 'supermaven-inc/supermaven-nvim', opts = { keymaps = { accept_suggestion = '', clear_suggestion = '', accept_word = '', }, }, }, { 'azorng/goose.nvim', dependencies = { 'nvim-lua/plenary.nvim', { 'MeanderingProgrammer/render-markdown.nvim', opts = { file_types = { 'markdown', 'goose' }, anti_conceal = { enabled = false }, }, }, }, opts = { prefered_picker = 'telescope', default_global_keymaps = false, ui = { window_widht = 0.3, input_height = 0.2, fullscreen = false, layout = 'right', floating_height = 0.9, display_model = true, display_goose_mode = true, }, providers = { anthropic = { 'claude-sonnet-4-20250514', }, gemini = { 'gemini-2.5-pro-preview-05-06', 'gemini-2.5-flash-preview-05-20', 'gemini-2.0-flash', }, groq = { 'deepseek-r1-distill-llama-70b', 'qwen-qwq-32b', }, }, }, keys = { { 'gg', 'Goose', mode = 'n', desc = 'Toggle goose' }, { 'gi', 'GooseOpenInput', mode = 'n', desc = 'Open goose input' }, { 'gI', 'GooseOpenInputNewSession', mode = 'n', desc = 'Open goose input in new session' }, { 'go', 'GooseOpenOutput', mode = 'n', desc = 'Open goose output' }, { 'gt', 'GooseToggleFocus', mode = 'n', desc = 'Toggle focus between goose and last window' }, { 'gq', 'GooseClose', mode = 'n', desc = 'Close goose' }, { 'gf', 'GooseToggleFullscreen', mode = 'n', desc = 'Toggle goose fullscreen' }, { 'gsn', 'GooseSelectSession', mode = 'n', desc = 'Select and load a goose session' }, -- { 'gmc', 'GooseModeChat', mode = 'n', desc = 'Set goose mode to `chat`' }, -- { 'gma', 'GooseModeAuto', mode = 'n', desc = 'Set goose mode to `auto`' }, { 'gp', 'GooseConfigureProvider', mode = 'n', desc = 'Quick provider and model switch from predefined list' }, { 'gd', 'GooseDiff', mode = 'n', desc = 'Opens a diff tab of a modified file since the last goose prompt' }, { 'g]', 'GooseDiffNext', mode = 'n', desc = 'Navigate to next file diff' }, { 'g[', 'GooseDiffPrev', mode = 'n', desc = 'Navigate to previous file diff' }, { 'gc', 'GooseDiffClose', mode = 'n', desc = 'Close diff view tab and return to normal editing' }, { 'gra', 'GooseDiffRevertAll', mode = 'n', desc = 'Revert all file changes since the last goose prompt' }, { 'grt', 'GooseDiffRevertThis', mode = 'n', desc = 'Revert current file changes since the last goose prompt' }, }, }, { 'yetone/avante.nvim', build = 'make', event = 'VeryLazy', version = 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', { -- support for image pasting 'HakonHarnes/img-clip.nvim', event = 'VeryLazy', opts = { -- recommended settings default = { embed_image_as_base64 = false, prompt_for_file_name = false, drag_and_drop = { insert_mode = true, }, -- required for Windows users use_absolute_path = true, }, }, }, { 'MeanderingProgrammer/render-markdown.nvim', opts = { file_types = { 'markdown', 'Avante' }, }, ft = { 'markdown', 'Avante' }, }, }, opts = { mappings = { ask = 'ua', edit = 'ue', refresh = 'ur', diff = { ours = 'co', theirs = 'ct', all_theirs = 'ca', both = 'cb', cursor = 'cc', next = ']x', prev = '[x', }, suggestion = { accept = '', next = '', prev = '', dismiss = '', }, jump = { next = ']]', prev = '[[', }, submit = { normal = '', insert = '', }, sidebar = { apply_all = 'A', apply_cursor = 'a', switch_windows = '', reverse_switch_windows = '', }, }, -- The custom_tools type supports both a list and a function that returns a list. Using a function here prevents requiring mcphub before it's loaded custom_tools = function() return { require('mcphub.extensions.avante').mcp_tool(), } end, hints = { enabled = true }, provider = 'gemini-pro', -- The system_prompt type supports both a string and a function that returns a string. Using a function here allows dynamically updating the prompt with `mcphub` system_prompt = function() local hub = require('mcphub').get_hub_instance() return hub and hub:get_active_servers_prompt() or '' end, providers = { ['gemini-pro'] = { __inherited_from = 'gemini', model = 'gemini-2.5-pro-preview-05-06', timeout = 600000, extra_request_body = { max_tokens = 40960 }, }, ['gemini-flash'] = { __inherited_from = 'gemini', model = 'gemini-2.0-flash', timeout = 600000, extra_request_body = { max_tokens = 20480 }, }, ['claude-sonnet-4'] = { __inherited_from = 'claude', model = 'claude-sonnet-4-20250514', timeout = 600000, extra_request_body = { max_tokens = 20480 }, }, groq = { __inherited_from = 'openai', api_key_name = 'GROQ_API_KEY', endpoint = 'https://api.groq.com/openai/v1/', model = 'deepseek-r1-distill-llama-70b', }, }, }, }, { 'sphamba/smear-cursor.nvim', opts = { cursor_color = '#ff8800', gamma = 1, hide_target_hack = true, stiffness = 0.3, trailing_exponent = 10, trailing_stiffness = 0.1, }, }, }