From 9015900222ad3008f579dd7f46a17b0ef4c4830c Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Fri, 29 Nov 2024 17:56:10 -0500 Subject: [PATCH] style: indents and spacing add default configuration options --- .config/nvim/lua/plugins/comment.lua | 42 ++++++++++++++++++---------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua index ae7d7e5..d03d0e2 100644 --- a/.config/nvim/lua/plugins/comment.lua +++ b/.config/nvim/lua/plugins/comment.lua @@ -1,16 +1,30 @@ return { - "numToStr/Comment.nvim", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "JoosepAlviste/nvim-ts-context-commentstring", + 'numToStr/Comment.nvim', + event = { 'BufReadPre', 'BufNewFile' }, + opts = { + padding = true, + sticky = true, + toggler = { + line = 'gcc', + block = 'gbc', + }, + opleader = { + line = 'gc', + block = 'gb', + }, + 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, + }, + pre_hook = nil, + post_hook = nil, }, - - config = function() - local comment = require("Comment") - local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim") - - comment.setup({ - pre_hook = ts_context_commentstring.create_pre_hook(), - }) - end, -} +} \ No newline at end of file