return { --harpoon { 'ThePrimeagen/harpoon', branch = 'harpoon2', dependencies = { 'nvim-lua/plenary.nvim' }, config = function() local harpoon = require('harpoon') harpoon:setup() vim.keymap.set('n', 'ha', function() harpoon:list():add() end, { desc = 'Harpoon add file' }) vim.keymap.set('n', 'hl', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = 'Harpoon quick menu' }) for i = 1, 9 do vim.keymap.set('n', '', function() harpoon:list():select(i) end, { desc = 'Harpoon to file ' .. i }) end end, }, -- better escape { 'max397574/better-escape.nvim', config = function() require('better_escape').setup({ mappings = { -- i for insert, other modes are the first letter too i = { -- map kj to exit insert mode k = { j = '', }, -- map jk and jj to exit insert mode j = { k = '', j = '', }, -- disable jj j = { j = false, }, }, }, }) end, }, -- Navigator { 'numToStr/Navigator.nvim', event = 'VeryLazy', config = function() require('Navigator').setup({ auto_save = 'current', disable_on_zoom = false, mux = 'auto', }) end, }, -- float terminal { 'akinsho/toggleterm.nvim', cmd = { 'ToggleTerm' }, version = '*', config = function() require('toggleterm').setup({ size = 10, open_mapping = [[]], hide_numbers = true, shade_filetypes = {}, shade_terminals = true, shading_factor = '2', start_in_insert = true, insert_mappings = true, terminal_mappings = true, persist_size = true, direction = 'float', -- 'vertical' | 'horizontal' | 'tab' | 'float' close_on_exit = true, shell = vim.o.shell, float_opts = { border = 'curved', -- 'single', 'double', 'shadow', etc. winblend = 0, -- Set to 0 for full transparency highlights = { border = 'Normal', background = 'Normal', }, }, }) end, }, -- smooth scrolling { 'karb94/neoscroll.nvim', opts = {}, }, -- discord presence -- { -- "vyfor/cord.nvim", -- event = "VeryLazy", -- }, -- uv { 'benomahony/uv.nvim', ft = 'python', event = 'BufReadPre', opts = { picker_integration = true, keymaps = { prefix = 'u', -- Main prefix for uv commands commands = true, -- Show uv commands menu (x) run_file = true, -- Run current file (xr) run_selection = true, -- Run selected code (xs) run_function = true, -- Run function (xf) venv = true, -- Environment management (xe) init = true, -- Initialize uv project (xi) add = true, -- Add a package (xa) remove = true, -- Remove a package (xd) sync = true, -- Sync packages (xc) sync_all = true, -- Sync all packages, extras and groups (xC) }, }, }, { 'wakatime/vim-wakatime', event = 'VimEnter', lazy = false }, -- { -- "m4xshen/hardtime.nvim", -- lazy = false, -- opts = {}, -- }, -- file operations { 'chrisgrieser/nvim-genghis', keys = { { 'fp', function() require('genghis').createNewFile() end, desc = 'New File', }, { 'fd', function() require('genghis').duplicateFile() end, desc = 'Duplicate File', }, { 'fr', function() require('genghis').renameFile() end, desc = 'Rename File', }, { 'fx', function() require('genghis').chmodx() end, desc = 'Make Executable', }, }, }, -- fold { 'kevinhwang91/nvim-ufo', event = { 'BufReadPost', 'BufNewFile' }, dependencies = { 'kevinhwang91/promise-async', event = 'BufReadPost' }, opts = { provider_selector = function() return { 'lsp', 'indent' } end, fold_virt_text_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, open_fold_hl_timeout = 0, }, keys = { { 'fd', 'zd', desc = 'Delete fold under cursor' }, { 'fo', 'zo', desc = 'Open fold under cursor' }, { 'fO', 'zO', desc = 'Open all folds under cursor' }, { 'fc', 'zC', desc = 'Close all folds under cursor' }, { 'fa', 'za', desc = 'Toggle fold under cursor' }, { 'fA', 'zA', desc = 'Toggle all folds under cursor' }, { 'fv', 'zv', desc = 'Show cursor line' }, { 'fM', function() require('ufo').closeAllFolds() end, desc = 'Close all folds', }, { 'fR', function() require('ufo').openAllFolds() end, desc = 'Open all folds', }, { 'fm', function() require('ufo').closeFoldsWith() end, desc = 'Fold more', }, { 'fr', function() require('ufo').openFoldsExceptKinds() end, desc = 'Fold less', }, { 'fx', 'zx', desc = 'Update folds' }, { 'fz', 'zz', desc = 'Center this line' }, { 'ft', 'zt', desc = 'Top this line' }, { 'fb', 'zb', desc = 'Bottom this line' }, { 'fg', 'zg', desc = 'Add word to spell list' }, { 'fw', 'zw', desc = 'Mark word as bad/misspelling' }, { 'fe', 'ze', desc = 'Right this line' }, { 'fE', 'zE', desc = 'Delete all folds in current buffer' }, { 'fs', 'zs', desc = 'Left this line' }, { 'fH', 'zH', desc = 'Half screen to the left' }, { 'fL', 'zL', desc = 'Half screen to the right' }, }, }, }