kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.16k stars 37 forks source link

Writing to a file opens all folds #182

Closed Omar-Ebrahim-1 closed 7 months ago

Omar-Ebrahim-1 commented 7 months ago

Neovim version (nvim -v | head -n1)

NVIM v0.9.4

Operating system/version

Arch Linux AMD64

How to reproduce the issue

:w in a file with closed folds

Expected behavior

:w in a file keeps the folds as they are

Actual behavior

:w in a file opens all folds

Omar-Ebrahim-1 commented 7 months ago

-- This is my UFO config:


vim.o.foldcolumn = '1' -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider needs a large value; feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true

vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)

require("ufo").setup({
  -- your configuration comes here
  -- or leave it empty to use the default settings
  -- refer to the configuration section below
})
kevinhwang91 commented 7 months ago

Your code base is stale, please update the latest.