Skip to content

Any option to make nvim-tree window keep current window width when opening another file from nvim-tree? #2915

Answered by alex-courtis
ljie-PI asked this question in Q&A
Discussion options

You must be logged in to vote

You have a lot of options for width, including a function to define whatever behaviour you want. See :help nvim-tree.view.width

You could try dynamic width: set a min and max to suit.

I have a mapping A that toggles between fixed width 30 and unlimited (adaptive) width: https://github.com/alex-courtis/arch/blob/master/config/nvim/lua/amc/plugins/nvt.lua#L103

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ljie-PI
Comment options

ljie-PI Sep 16, 2024
Collaborator Author

@alex-courtis
Comment options

Answer selected by gegoune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants