comments.lua 767 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. local M = {
  2. {
  3. "numToStr/Comment.nvim",
  4. dependencies = {
  5. "JoosepAlviste/nvim-ts-context-commentstring",
  6. event = "VeryLazy",
  7. },
  8. },
  9. { "folke/todo-comments.nvim" },
  10. }
  11. M.config = function()
  12. vim.g.skip_ts_context_commentstring_module = true
  13. require("ts_context_commentstring").setup({
  14. enable_autocmd = false,
  15. })
  16. require("Comment").setup({
  17. pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
  18. opleader = {
  19. line = "gc",
  20. block = "gC",
  21. },
  22. mappings = {
  23. basic = true,
  24. },
  25. })
  26. require("todo-comments").setup({
  27. keywords = {
  28. FUCK = { icon = "󰇷 ", color = "error" },
  29. SHITTY = { icon = "󰇷 ", color = "error" },
  30. },
  31. })
  32. end
  33. return M