comment keys

This commit is contained in:
Christoph J. Scherr 2024-07-04 15:53:00 +02:00
parent 7ba8b0a752
commit dc80c47b6a
1 changed files with 8 additions and 3 deletions

View File

@ -8,10 +8,15 @@ return {
{ 'gbc', mode = 'n', desc = 'Comment toggle current block' },
{ 'gb', mode = { 'n', 'o' }, desc = 'Comment toggle blockwise' },
{ 'gb', mode = 'x', desc = 'Comment toggle blockwise (visual)' },
{
'<leader>v',
function()
require('Comment.api').toggle.linewise.current()
end,
mode = { 'n', 'v' },
desc = 'Comment toggle current line',
},
},
init = function()
require('core.utils').load_mappings 'comment'
end,
config = function(_, opts)
vim.keymap.set('n', '<leader>c', function()
require('Comment.api').toggle.linewise.current()