1 -- Smart and powerful comment plugin for neovim.
2 -- Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
3 -- https://github.com/numToStr/Comment.nvim
6 event = { "BufEnter" },
8 require("Comment").setup({
9 ---Add a space b/w comment and the line
11 ---Whether the cursor should stay at its position
13 ---Lines to be ignored while (un)comment
15 ---LHS of toggle mappings in NORMAL mode
17 ---Line-comment toggle keymap
19 ---Block-comment toggle keymap
22 ---LHS of operator-pending mappings in NORMAL and VISUAL mode
24 ---Line-comment keymap
26 ---Block-comment keymap
29 ---LHS of extra mappings
31 ---Add comment on the line above
33 ---Add comment on the line below
35 ---Add comment at the end of line
39 ---NOTE: If given `false` then the plugin won't create any mappings
41 ---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
43 ---Extra mapping; `gco`, `gcO`, `gcA`
46 ---Function to call before (un)comment
48 ---Function to call after (un)comment