From 49d1e550e9ac188ec20fa4fe801c4216fe2037b1 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Mon, 4 Sep 2023 15:41:53 +0200 Subject: [PATCH] Clean up comment --- lua/config/comment.lua | 66 +----------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/lua/config/comment.lua b/lua/config/comment.lua index 3528e6d..6fd22d2 100644 --- a/lua/config/comment.lua +++ b/lua/config/comment.lua @@ -18,71 +18,7 @@ require("Comment").setup( { - ---Add a space b/w comment and the line - ---@type boolean|fun():boolean - padding = true, - - ---Whether the cursor should stay at its position - ---NOTE: This only affects NORMAL mode mappings and doesn't work with dot-repeat - ---@type boolean - sticky = true, - - ---Lines to be ignored while comment/uncomment. - ---Could be a regex string or a function that returns a regex string. - ---Example: Use '^$' to ignore empty lines - ---@type string|fun():string + --ignore empty lines ignore = "^$", - - ---LHS of toggle mappings in NORMAL + VISUAL mode - ---@type table - toggler = { - ---Line-comment toggle keymap - line = "gcc", - ---Block-comment toggle keymap - block = "gbc", - }, - - ---LHS of operator-pending mappings in NORMAL + VISUAL mode - ---@type table - opleader = { - ---Line-comment keymap - line = "gc", - ---Block-comment keymap - block = "gb", - }, - - ---LHS of extra mappings - ---@type table - extra = { - ---Add comment on the line above - above = "gcO", - ---Add comment on the line below - below = "gco", - ---Add comment at the end of line - eol = "gcA", - }, - - ---Create basic (operator-pending) and extended mappings for NORMAL + VISUAL mode - ---@type table - mappings = { - ---Operator-pending mapping - ---Includes `gcc`, `gbc`, `gc[count]{motion}` and `gb[count]{motion}` - ---NOTE: These mappings can be changed individually by `opleader` and `toggler` config - basic = true, - ---Extra mapping - ---Includes `gco`, `gcO`, `gcA` - extra = true, - ---Extended mapping - ---Includes `g>`, `g<`, `g>[count]{motion}` and `g<[count]{motion}` - extended = false, - }, - - ---Pre-hook, called before commenting the line - ---@type fun(ctx: Ctx):string - pre_hook = nil, - - ---Post-hook, called after commenting is done - ---@type fun(ctx: Ctx) - post_hook = nil, } )