diff --git a/lua/config/options.lua b/lua/config/options.lua index f093a96..e3abb4b 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -17,7 +17,7 @@ opt.number = true -- Show line numbers opt.relativenumber = true -- Relative line numbers opt.signcolumn = "yes" -- Always show sign column opt.termguicolors = true -- True color support -opt.wrap = true -- Disable line wrap +opt.wrap = false -- Disable line wrap -- Indentation opt.expandtab = true -- Use spaces instead of tabs diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index c541810..f898f6b 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -156,4 +156,38 @@ return { }, }, }, + + -- Help comment and uncomment lines + { + 'numToStr/Comment.nvim', + opts = { + padding = true, + + -- LHS of toggle mappings in NORMAL mode + toggler = { + line = 'gcc', + block = 'gbc', + }, + + -- LHS of operator-pending mappings in NORMAL and VISUAL + opleader = { + line = "gc", + block = "gb", + }, + + -- LHS of extra mappings + 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', + }, + mappings = { + basic = true, + extra = true, + }, + }, + }, }