Skip to content

Commit

Permalink
ufo: update deprecated close_fold_kinds setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 10, 2024
1 parent 30ba565 commit c6c751a
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions lua/nxvim/plugins/ufo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ end

ufo.setup({
open_fold_hl_timeout = 150,
close_fold_kinds = { "imports", "comment" },
close_fold_kinds_for_ft = {
default = { "imports", "comment" },
markdown = {},
git = {},
NeogitStatus = {},
},
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
Expand All @@ -38,26 +43,19 @@ ufo.setup({

-- { == Keymaps ==> ===========================================================

nx.au({
"BufEnter",
callback = function()
if ignored_filetypes[vim.bo.ft] or vim.bo.bt ~= "" then return end

nx.map({
{ "zR", ufo.openAllFolds },
{ "zM", ufo.closeAllFolds },
{ "zr", ufo.openFoldsExceptKinds },
{ "zm", ufo.closeFoldsWith },
{
"K",
function()
local winid = ufo.peekFoldedLinesUnderCursor()
if not winid then vim.lsp.buf.hover() end
end,
},
}, { buffer = true })
end,
})
nx.map({
{ "zR", ufo.openAllFolds },
{ "zM", ufo.closeAllFolds },
{ "zr", ufo.openFoldsExceptKinds },
{ "zm", ufo.closeFoldsWith },
{
"K",
function()
local winid = ufo.peekFoldedLinesUnderCursor()
if not winid then vim.lsp.buf.hover() end
end,
},
}, { buffer = true })
-- <== }

if vim.g.colors_name == "dracula" then nx.hl({ "Folded", fg = "SignColumn:fg", bg = "DraculaBgLight:bg" }) end

0 comments on commit c6c751a

Please sign in to comment.