return { { 'numToStr/Comment.nvim', keys = { { 'gcc', mode = 'n', desc = 'Comment toggle current line' }, { 'gc', mode = { 'n', 'o' }, desc = 'Comment toggle linewise' }, { 'gc', mode = 'x', desc = 'Comment toggle linewise (visual)' }, { 'gbc', mode = 'n', desc = 'Comment toggle current block' }, { 'gb', mode = { 'n', 'o' }, desc = 'Comment toggle blockwise' }, { 'gb', mode = 'x', desc = 'Comment toggle blockwise (visual)' }, { 'v', function() require('Comment.api').toggle.linewise.current() end, mode = { 'n' }, desc = 'Comment toggle current line', }, { 'v', function() local esc = vim.api.nvim_replace_termcodes('', true, false, true) vim.api.nvim_feedkeys(esc, 'nx', false) require('Comment.api').toggle.linewise(vim.fn.visualmode()) end, mode = { 'x' }, desc = 'Comment toggle selected lines', }, }, config = function(_, opts) vim.keymap.set('n', 'c', function() require('Comment.api').toggle.linewise.current() end, { desc = '[T]oggle [C]omment' }) vim.keymap.set('v', 'c', function() require('Comment.api').toggle.linewise.current() end, { desc = '[T]oggle [C]omment' }) require('Comment').setup(opts) end, }, { 'uga-rosa/ccc.nvim', lazy = false, event = 'FileType', keys = { { 'cp', 'CccPick', desc = 'Color-picker' }, }, opts = { highlighter = { auto_enable = true, lsp = true, excludes = { 'lazy', 'mason', 'help', 'neo-tree' }, }, }, }, { 'dhruvasagar/vim-table-mode', lazy = false, -- tm is automatically set for toggle -- see t menu }, { 'ziontee113/icon-picker.nvim', keys = { { 'fi', 'IconPickerNormal', desc = 'pick icon' }, }, cmd = { 'IconPickerInsert', 'IconPickerYank', 'IconPickerNormal' }, config = function() require('icon-picker').setup { disable_legacy_commands = true } end, }, { 'windwp/nvim-autopairs', event = 'InsertEnter', -- Optional dependency dependencies = { 'hrsh7th/nvim-cmp' }, config = function() require('nvim-autopairs').setup {} -- WARN: this is kind of anoying with rust, so I have disabeld it -- -- If you want to automatically add `(` after selecting a function or method -- local cmp_autopairs = require 'nvim-autopairs.completion.cmp' -- local cmp = require 'cmp' -- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) end, }, { 'mbbill/undotree', config = function() vim.keymap.set({ 'n', 'v' }, 'u', vim.cmd.UndotreeToggle, { desc = '[U]ndo menu' }) vim.g.undotree_WindowLayout = 3 vim.g.undotree_SplitWidth = 32 vim.g.undotree_DiffAutoOpen = false end, }, }