Replies: 2 comments 1 reply
-
Today I learned!
Experimentation revealed that we can turn local events = require('nvim-tree.api').events
local Event = events.Event
events.subscribe(Event.TreeOpen, function()
vim.o.winwidth = 20
end)
events.subscribe(Event.TreeClose, function()
vim.o.winwidth = 80
end) |
Beta Was this translation helpful? Give feedback.
-
Thank you! This looks very promising. But instead of the tree being open it should probably listen on the tree being focused. For the time being I solved my issue with this plugin: https://github.com/beauwilliams/focus.nvim |
Beta Was this translation helpful? Give feedback.
-
Hi! I have a smaller screen and
vim.o.winwidth = 80
in my config. That way I can see 80 columns when I change the focused window on vertical splits.Unfortunately nvim-tree also becomes 80 columns (opened through
:NvimTreeToggle<cr>
), which I don't need. Is there someway to work around this?Beta Was this translation helpful? Give feedback.
All reactions