Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>
This commit is contained in:
Ching Pei Yang 2024-11-30 15:37:03 +01:00 committed by Ching Pei Yang
parent fa7785ede6
commit b3170c0fe3
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -16,9 +16,9 @@ in {
setupModule = "Comment";
inherit (cfg) setupOpts;
keys = [
(mkKeymap ["n"] cfg.mappings.toggleOpLeaderLine "<Plug>(comment_toggle_linewise)" {desc = mappings.toggleOpLeaderLine.description;})
(mkKeymap ["n"] cfg.mappings.toggleOpLeaderBlock "<Plug>(comment_toggle_blockwise)" {desc = mappings.toggleOpLeaderBlock.description;})
(mkKeymap ["n"] cfg.mappings.toggleCurrentLine ''
(mkKeymap "n" cfg.mappings.toggleOpLeaderLine "<Plug>(comment_toggle_linewise)" {desc = mappings.toggleOpLeaderLine.description;})
(mkKeymap "n" cfg.mappings.toggleOpLeaderBlock "<Plug>(comment_toggle_blockwise)" {desc = mappings.toggleOpLeaderBlock.description;})
(mkKeymap "n" cfg.mappings.toggleCurrentLine ''
function()
return vim.api.nvim_get_vvar('count') == 0 and '<Plug>(comment_toggle_linewise_current)'
or '<Plug>(comment_toggle_linewise_count)'