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
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -30,3 +30,8 @@ vim.opt.listchars = {
|
|||
-- Enable line numbers and relative line numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Phase 6.2: UX settings
|
||||
vim.opt.signcolumn = 'yes' -- Always show sign column (for LSP diagnostics, git signs, etc.)
|
||||
vim.opt.cursorline = true -- Highlight current line
|
||||
vim.opt.colorcolumn = '80,120' -- Visual guides at 80 and 120 characters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue