comment.lua 645 B

12345678910111213141516171819202122232425
  1. local M = {}
  2. function M.config()
  3. lvim.builtin.comment = {
  4. active = true,
  5. -- Linters prefer comment and line to have a space in between markers
  6. marker_padding = true,
  7. -- should comment out empty or whitespace only lines
  8. comment_empty = false,
  9. -- Should key mappings be created
  10. create_mappings = true,
  11. -- Normal mode mapping left hand side
  12. line_mapping = "gcc",
  13. -- Visual/Operator mapping left hand side
  14. operator_mapping = "gc",
  15. -- Hook function to call before commenting takes place
  16. hook = nil,
  17. }
  18. end
  19. function M.setup()
  20. require("nvim_comment").setup(lvim.builtin.comment)
  21. end
  22. return M