diff --git a/modules/plugins/comments/comment-nvim/config.nix b/modules/plugins/comments/comment-nvim/config.nix index 2b555a90..4c18f7e9 100644 --- a/modules/plugins/comments/comment-nvim/config.nix +++ b/modules/plugins/comments/comment-nvim/config.nix @@ -16,9 +16,9 @@ in { setupModule = "Comment"; inherit (cfg) setupOpts; keys = [ - (mkKeymap ["n"] cfg.mappings.toggleOpLeaderLine "(comment_toggle_linewise)" {desc = mappings.toggleOpLeaderLine.description;}) - (mkKeymap ["n"] cfg.mappings.toggleOpLeaderBlock "(comment_toggle_blockwise)" {desc = mappings.toggleOpLeaderBlock.description;}) - (mkKeymap ["n"] cfg.mappings.toggleCurrentLine '' + (mkKeymap "n" cfg.mappings.toggleOpLeaderLine "(comment_toggle_linewise)" {desc = mappings.toggleOpLeaderLine.description;}) + (mkKeymap "n" cfg.mappings.toggleOpLeaderBlock "(comment_toggle_blockwise)" {desc = mappings.toggleOpLeaderBlock.description;}) + (mkKeymap "n" cfg.mappings.toggleCurrentLine '' function() return vim.api.nvim_get_vvar('count') == 0 and '(comment_toggle_linewise_current)' or '(comment_toggle_linewise_count)'