configure comment.nvim
This commit is contained in:
parent
907331f4f2
commit
ab42f6cebc
5 changed files with 70 additions and 13 deletions
24
lua/plugins/comment.lua
Normal file
24
lua/plugins/comment.lua
Normal 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
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue