feat(mini.comment): added ts-context-commentstring back and made it work with mini.comment

This commit is contained in:
Folke Lemaitre
2023-05-23 08:41:44 +02:00
parent 7443effe26
commit 89db0157b1
2 changed files with 23 additions and 0 deletions

View File

@ -131,9 +131,18 @@ return {
},
-- comments
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true },
{
"echasnovski/mini.comment",
event = "VeryLazy",
config = function(_, opts)
local c = require("mini.comment")
c.setup(opts)
local H = require("lazyvim.util").get_upvalue(c.setup, "H")
H.get_commentstring = function()
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
end
end,
opts = {},
},