2024-07-04 14:43:32 +02:00
|
|
|
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)' },
|
2024-07-04 15:53:00 +02:00
|
|
|
{
|
|
|
|
'<leader>v',
|
|
|
|
function()
|
|
|
|
require('Comment.api').toggle.linewise.current()
|
|
|
|
end,
|
2024-07-04 17:35:15 +02:00
|
|
|
mode = { 'n' },
|
2024-07-04 15:53:00 +02:00
|
|
|
desc = 'Comment toggle current line',
|
|
|
|
},
|
2024-07-04 17:35:15 +02:00
|
|
|
{
|
|
|
|
'<leader>v',
|
|
|
|
function()
|
|
|
|
local esc = vim.api.nvim_replace_termcodes('<ESC>', 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',
|
|
|
|
},
|
2024-07-04 14:43:32 +02:00
|
|
|
},
|
|
|
|
config = function(_, opts)
|
|
|
|
vim.keymap.set('n', '<leader>c', function()
|
|
|
|
require('Comment.api').toggle.linewise.current()
|
|
|
|
end, { desc = '[T]oggle [C]omment' })
|
|
|
|
vim.keymap.set('v', '<leader>c', function()
|
|
|
|
require('Comment.api').toggle.linewise.current()
|
|
|
|
end, { desc = '[T]oggle [C]omment' })
|
|
|
|
|
|
|
|
require('Comment').setup(opts)
|
|
|
|
end,
|
|
|
|
},
|
2024-07-04 15:24:34 +02:00
|
|
|
{
|
|
|
|
'uga-rosa/ccc.nvim',
|
|
|
|
lazy = false,
|
|
|
|
event = 'FileType',
|
|
|
|
keys = {
|
|
|
|
{ '<Leader>cp', '<cmd>CccPick<CR>', desc = 'Color-picker' },
|
|
|
|
},
|
|
|
|
opts = {
|
|
|
|
highlighter = {
|
|
|
|
auto_enable = true,
|
|
|
|
lsp = true,
|
|
|
|
excludes = { 'lazy', 'mason', 'help', 'neo-tree' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'dhruvasagar/vim-table-mode',
|
|
|
|
lazy = false,
|
|
|
|
-- <Leader>tm is automatically set for toggle
|
|
|
|
-- see <Leader>t menu
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'ziontee113/icon-picker.nvim',
|
|
|
|
keys = {
|
2024-07-04 17:19:47 +02:00
|
|
|
{ '<localleader>fi', '<cmd>IconPickerNormal<CR>', desc = 'pick icon' },
|
2024-07-04 15:24:34 +02:00
|
|
|
},
|
|
|
|
cmd = { 'IconPickerInsert', 'IconPickerYank', 'IconPickerNormal' },
|
|
|
|
config = function()
|
|
|
|
require('icon-picker').setup { disable_legacy_commands = true }
|
|
|
|
end,
|
|
|
|
},
|
2024-07-04 17:35:15 +02:00
|
|
|
{
|
|
|
|
'windwp/nvim-autopairs',
|
|
|
|
event = 'InsertEnter',
|
|
|
|
-- Optional dependency
|
|
|
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
|
|
|
config = function()
|
|
|
|
require('nvim-autopairs').setup {}
|
|
|
|
-- 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,
|
|
|
|
},
|
2024-07-04 14:43:32 +02:00
|
|
|
}
|