sindrets / diffview.nvim

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

Feature: A configuation setting to hide the files panel by default #303

Open mangelozzi opened 1 year ago

mangelozzi commented 1 year ago

I have refered to :h diffview-config-view.x.layout and looked at the config, but there is no setting to disable the file panel by default.

As far as I can see a reasonable way is to create a hook when DiffView opens, and then run:

    hooks = { -- See ':h diffview-config-hooks'
        view_opened = function()
            require("diffview.actions").toggle_files()
        end,
    },         
kagbodji commented 1 year ago

Thanks for sharing the hook solution @mangelozzi. I was wrangling my mind trying to figure a way to do this.

sathishmanohar commented 1 year ago

Works great but there is a flicker when start starting diffview now.