2023-08-24 19:39:11 +02:00
|
|
|
return {
|
|
|
|
"numToStr/Comment.nvim",
|
|
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
|
|
dependencies = {
|
|
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
-- import comment plugin safely
|
|
|
|
local comment = require("Comment")
|
2022-10-17 20:40:36 +02:00
|
|
|
|
2023-08-24 19:39:11 +02:00
|
|
|
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
|
|
|
|
|
|
|
|
-- enable comment
|
|
|
|
comment.setup({
|
2024-04-03 17:08:26 +02:00
|
|
|
-- for commenting tsx, jsx, svelte, html files
|
2023-08-24 19:39:11 +02:00
|
|
|
pre_hook = ts_context_commentstring.create_pre_hook(),
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
}
|