nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Right aligned icons

mr2rm opened this issue · comments

commented

Is this a question?
Please start a new Q&A discussion instead of raising a feature request.

Can this functionality be implemented utilising API?
nvim-tree exposes extensive API (see :h nvim-tree-api). Can it be used to achieve your goal? Is there a missing API that would make it possible?
I couldn't find anything related in API documentation

Is your feature request related to a problem? Please describe.
I was looking for an option to align icons and symbols to the pane's right. It would be cleaner and less misleading. Also, I found this feature available in the NeoTree, and looks nice.

Describe the solution you'd like
We can add a new choice to nvim-tree.renderer.icons.*_placement (e.g. right_aligned). Then we can simply display sorted icons based on their priority on the right-hand side of the window.

Describe alternatives you've considered
As an alternative, we could also add a new general flag for this setting which overrides all the replacements. For instance, we can call it nvim-tree.renderer.icons.placement with none and right_aligned values.

Additional context
This is what I found on NeoTree:

Screenshot 2024-04-21 at 19 21 19

Duplicate of #2349.