From 4b89bce4b8ca6dc7014af5bcb4ddd61527c54a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 29 Mar 2024 18:14:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(nvim):=20nvim-ufo=20changes?= =?UTF-8?q?=20to=20some=20opts=20definitions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/extras/editor/fold.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/editor/fold.lua b/.config/nvim/lua/plugins/extras/editor/fold.lua index 028f5e89..92d9ce19 100644 --- a/.config/nvim/lua/plugins/extras/editor/fold.lua +++ b/.config/nvim/lua/plugins/extras/editor/fold.lua @@ -1,5 +1,5 @@ return { - { -- better fold + { "kevinhwang91/nvim-ufo", event = { "LazyFile" }, dependencies = { "kevinhwang91/promise-async" }, @@ -27,7 +27,6 @@ return { local hlGroup = chunk[2] table.insert(newVirtText, { chunkText, hlGroup }) chunkWidth = vim.fn.strdisplaywidth(chunkText) - -- str width returned from truncate() may less than 2nd argument, need padding if curWidth + chunkWidth < targetWidth then suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) end @@ -45,7 +44,7 @@ return { return { "treesitter", "indent" } end, open_fold_hl_timeout = 400, - close_fold_kinds = { "imports", "comment" }, + close_fold_kinds_for_ft = { "imports", "comment" }, preview = { win_config = { border = { "", "─", "", "", "", "─", "", "" }, winblend = 0 }, mappings = { @@ -57,9 +56,6 @@ return { }, } end, - config = function(_, opts) - require("ufo").setup(opts) - end, keys = { { "zp",