style: indents and spacing
add default configuration options
This commit is contained in:
@@ -1,16 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
"numToStr/Comment.nvim",
|
'numToStr/Comment.nvim',
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
dependencies = {
|
opts = {
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
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,
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user