mirror of
https://github.com/darwincereska/nvim-config.git
synced 2026-02-12 08:34:41 -05:00
feat(working): first working condition
This commit is contained in:
@@ -2,6 +2,34 @@ return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("config.plugin.comment")
|
||||
require("Comment").setup({
|
||||
-- Add a space b/w comment and the line
|
||||
padding = true,
|
||||
-- Whether the cursor should stay at its position
|
||||
sticky = true,
|
||||
-- Lines to be ignored while (un)comment
|
||||
ignore = nil,
|
||||
-- LHS of toggle mappings in NORMAL mode
|
||||
toggler = {
|
||||
line = 'gcc', -- Line-comment toggle keymap
|
||||
block = 'gbc', -- Block-comment toggle keymap
|
||||
},
|
||||
-- LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
line = 'gc', -- Line-comment keymap
|
||||
block = 'gb', -- Block-comment keymap
|
||||
},
|
||||
-- LHS of extra mappings
|
||||
extra = {
|
||||
above = 'gcO', -- Add comment on the line above
|
||||
below = 'gco', -- Add comment on the line below
|
||||
eol = 'gcA', -- Add comment at the end of line
|
||||
},
|
||||
-- Enable keybindings
|
||||
mappings = {
|
||||
basic = true, -- Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
extra = true, -- Extra mapping; `gco`, `gcO`, `gcA`
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user