Skip to content

Conversation

davidsierradz
Copy link
Contributor

WIP

Hi. I'm using vimpostor/vim-tpipeline with laststatus=0. There is some kind of problem when nvim-tree.lua populates the different statusbars in each window, vim-tpipeline doesn't like it. I also use s1n7ax/nvim-window-picker to pick a window when opening a file from telescope.nvim. They added an option to use the winbar instead of the statusbar to select the window. Could we also do something similar in nvim-tree.lua? This PR is some hack I did to test the idea, by adapting (stealing) their code.

PS. Ideally, we could abstract the window_picker interface to hook into an arbitrary window picker implementation and reuse the nvim-window-picker function (or another, like t9md/vim-choosewin)

PS2. nvim-window-picker is inspired by nvim-tree.lua, so it comes full circle =)

Thanks!

@alex-courtis
Copy link
Member

I like the idea. There's doesn't appear to be anything specific to winbar other than the name of the option, which is good.

PS. Ideally, we could abstract the window_picker interface to hook into an arbitrary window picker implementation

Yes, this. It will allow much greater flexibility and minimises the scope of the changes.

I'm out of time and will review the complete PR ~next weekend.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

PS. Ideally, we could abstract the window_picker interface to hook into an arbitrary window picker implementation

Let's make this really abstract, with picking done by calling a default (current functionality) function or the user's.

I imagine the user's function should return the HL groups as well as executing the select.

@davidsierradz
Copy link
Contributor Author

Replaced by 1782

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants