sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.57k stars 101 forks source link

How Can I Expand All Fold by Default in DiffviewFileHistory? #437

Closed imroc closed 7 months ago

imroc commented 7 months ago

Everytime I use DIffviewFileHistory to see commit changes, I need to press zR to expand all fold to see the complete file content, Is there a way or option can expand all fold by default?

gaslight217 commented 7 months ago

Same with @imroc, If there any way to unfold all code in diffview by default?

gaslight217 commented 7 months ago

Find it, @imroc, https://github.com/sindrets/diffview.nvim/issues/236, try "foldenable = false"

imroc commented 7 months ago

@gaslight217 Thanks a lot! I use this config and it works for me:

      hooks = {
        diff_buf_win_enter = function()
          vim.opt_local.foldenable = false
        end,
      },