🐛 fix(nvim): nvim-ufo changes to some opts definitions

This commit is contained in:
Sergio Laín 2024-03-29 18:14:38 +01:00
parent fb5446eebd
commit 4b89bce4b8
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -1,5 +1,5 @@
return { return {
{ -- better fold {
"kevinhwang91/nvim-ufo", "kevinhwang91/nvim-ufo",
event = { "LazyFile" }, event = { "LazyFile" },
dependencies = { "kevinhwang91/promise-async" }, dependencies = { "kevinhwang91/promise-async" },
@ -27,7 +27,6 @@ return {
local hlGroup = chunk[2] local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup }) table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText) chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end end
@ -45,7 +44,7 @@ return {
return { "treesitter", "indent" } return { "treesitter", "indent" }
end, end,
open_fold_hl_timeout = 400, open_fold_hl_timeout = 400,
close_fold_kinds = { "imports", "comment" }, close_fold_kinds_for_ft = { "imports", "comment" },
preview = { preview = {
win_config = { border = { "", "", "", "", "", "", "", "" }, winblend = 0 }, win_config = { border = { "", "", "", "", "", "", "", "" }, winblend = 0 },
mappings = { mappings = {
@ -57,9 +56,6 @@ return {
}, },
} }
end, end,
config = function(_, opts)
require("ufo").setup(opts)
end,
keys = { keys = {
{ {
"zp", "zp",