configure comment.nvim

This commit is contained in:
Ray Elliott 2025-12-07 21:00:09 +00:00
commit ab42f6cebc
5 changed files with 70 additions and 13 deletions

24
lua/plugins/comment.lua Normal file
View file

@ -0,0 +1,24 @@
-- Phase 6.3: Comment.nvim for commenting
return {
'numToStr/Comment.nvim',
event = 'VeryLazy',
opts = {
-- Use default keymaps: gcc (line), gc (visual), gbc (block), gb (visual block)
padding = true, -- Add space between comment and text
sticky = true, -- Keep cursor position after commenting
ignore = '^$', -- Ignore empty lines
toggler = {
line = 'gcc', -- Line comment toggle
block = 'gbc', -- Block comment toggle
},
opleader = {
line = 'gc', -- Line comment operator
block = 'gb', -- Block comment operator
},
extra = {
above = 'gcO', -- Add comment on line above
below = 'gco', -- Add comment on line below
eol = 'gcA', -- Add comment at end of line
},
},
}