nvim/lua/plugins/comment.lua
ray f8f478a985 Complete config migration cleanup
Retire legacy files and migration fixtures, move runtime state out of the repository, and migrate Tree-sitter and textobjects to their Neovim 0.12-compatible main branches.
2026-10-28 19:26:42 +00:00

24 lines
806 B
Lua

-- 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
},
},
}