nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

adaptive window width?

Open yimingwangdell opened this issue 3 years ago • 2 comments

Is this a question?

Can this functionality be implemented utilising API? Don't know

Is your feature request related to a problem? Please describe. I can only set a fixed window width, but when I open a java project, file name is out of tree window.

Describe the solution you'd like if file path is deep and cannot be rendered well, adjust window size and cursor position.

Describe alternatives you've considered

Additional context

yimingwangdell avatar Aug 30 '23 09:08 yimingwangdell

Have a look at :h nvim-tree.view.width.

gegoune avatar Aug 30 '23 09:08 gegoune

@yimingwangdell something like this could work:

keymap.set("n", "<leader>=", "<cmd>NvimTreeResize +5<CR>", { desc = "Increase file explorer width" })
keymap.set("n", "<leader>-", "<cmd>NvimTreeResize -5<CR>", { desc = "Decrease file explorer width" })

saadjs avatar Sep 06 '23 18:09 saadjs