From b75ed594a932e6e01d8c1ee5b23215221164d494 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 May 2023 14:24:22 +0200 Subject: [PATCH] fix(mini.comment): removed dirty upvalues hack for mini.comments. no longer needed --- lua/lazyvim/plugins/coding.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 017e295e..49599eb6 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -135,15 +135,13 @@ return { { "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 = {}, + opts = { + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring + end, + }, + }, }, -- better text-objects