How would you get the width of the window size from NvimTree? #1813
Unanswered
DennisTheMenace780
asked this question in
Q&A
Replies: 1 comment
-
winwidth is vimscript only. See
You can use an internal function to determine whether a buffer is nvim-tree: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have Toggle Term and Nvim Tree set up and what I find happening is that the window for NvimTree can be above Toggle Term, or it can be to the left of Toggle Term.
I think that I can probably create a function for Toggle Term that, when opened, inspects the size of NvimTree and then adjusts the dimensions accordingly. I'm still pretty new to the ecosystem though, so it's not totally clear to me how I would get this information from the nvim-tree plugin over into my custom function. If someone is more familiar with the code base for NvimTree, could you tell me where I can look to get this dimension information?
I have tried to do a
:lua print(winwidth(0))
as I understood this to return dimensions of the currently active window, but I keep getting a nil message back.I have taken some images below that show what I want and what I don't want to have happen.
What I don't want What I do want
Beta Was this translation helpful? Give feedback.
All reactions