feat: Show parent directory in a split next to oil buffer#488
feat: Show parent directory in a split next to oil buffer#488DriesOlbrechts wants to merge 1 commit intostevearc:masterfrom
Conversation
|
@stevearc any reason this isn't being looked at? |
stevearc
left a comment
There was a problem hiding this comment.
Apologies for the long wait; I haven't written a full accounting of this anywhere yet. The way I like to manage my projects is by maintaining "inbox zero," so zero open unanswered issues/PRs. Some time last year my backlog got so long that it was causing me a lot of stress and killing my motivation to do any work at all, making the problem worse. I decided to declare "bug bankruptcy" and manually zero out my inbox, only responding to new issues & PRs after that cutoff. The good news is that it worked and I've been able to continue maintaining my projects, but the bad news is that it obviously left a lot of threads dangling, which is unfair to people like you that put in a lot of work crafting a PR or writing up a good bug report. So for you and for everyone else affected, I'm sorry, it's not a directed choice to ignore you, it's just load shedding to maintain my sanity. Due to some recent travel, sickness, more sickness, and more travel, my backlog has been creeping back up, but I'm optimistic that I'll be able to zero it out again over the next month or so. And once I've started engaging with a PR I try to give it higher priority, so hopefully this one won't get dropped again.
Now, on to the review:
I've only done a cursory review of the code, but it appears fine. The main area I'd like to focus on is the API & interface. The first incarnation of oil just had a simple directory buffer, which is easy to reason about. You go to whatever window you want, open oil, mess around, then when you open a file it opens in that same window. Then, preview windows were added as an extra option. Now you can open oil in the current window, but also make a split to show the preview window. It's a little harder to reason about / mucks up the UI a bit more, but in a limited capacity and it's aided a little bit by leaning on vim's concept of a preview window. This PR introduces the possibility for two window splits off of the original, which can get messy and hard to reason about. Three windows is also enough to basically take over all visual space on a given tab.
What do you think about instead constraining this functionality specifically to a floating window view? Right now we have :Oil --float, what if we made another specific view like :Oil --miller that opens a miller column view in floating windows, like what mini.files does? The existing floating window view could be reworked to be a subset of this functionality. Would that serve for your use case?
|
No worries about the wait! Let's see if I'm understanding this correctly, the That does sound like a good solution that will help my usecase as well as provide an option for people who are looking for a miller approach. I'm happy to start working on this. |
|
Hmmm...on second look
But we can bikeshed on this later. You asked about suggestions on how to approach this, I'd recommend looking at the existing implementation of open_float, including how it handles the preview window. You can also look at this implementation of miller columns that I made for aerial.nvim. It won't be a straight port, but some of the structure and most of the nvim API methods should translate. |
|
@stevearc I also accidentally closed the PR when reverting the changes, is it possible to reopen this? |
|
I can't reopen the PR because the branch has no changes from master. If you make some placeholder changes I can reopen it |
This PR adds the feature requested in #349.
A split is opened showing the parent directory for the current oil directory.
This PR is an improvement on #487.
After looking at the code again I realised I was completely overcomplicating my solution and rewrote it.
I love what you're doing with Oil.nvim and hope my contribution can add some value!