pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.46k stars 143 forks source link

Unable to disable folding in diff view #495

Open mortimr opened 9 months ago

mortimr commented 9 months ago

Hey !

I'm currently using Octo and I want to know how someone can disable the folding in the review pane. I've tried all the vim settings to disable all forms of folding but it seems that Octo is not taking them into account.

        foldmethod = "manual"
        foldlevelstart = 99
        foldenable = false

As I don't see any config options related to this folding I was wondering if there was a way to disable it.

benelan commented 3 months ago

You can use this autocommand:

vim.api.nvim_create_autocmd("BufEnter", {
  pattern = "octo://*",
  command = "if &diff | set nofoldenable | fi",
})

Related: #536