Closed
Description
Description
Pretty much the title. I have configured NvimTree to start when opening a directory. When started this way, the first time I open a file NvimTree will align itself on the right side of the screen for some reason. Closing the file and opening it again will correctly re-align NvimTree on the left side.
Neovim version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Operating system and version
5.19.2-arch1-1
nvim-tree version
e3353c4
Minimal config
-- PLUGINS
local Plug = vim.fn['plug#']
vim.call('plug#begin', '~/.config/nvim/plugged')
Plug 'kyazdani42/nvim-tree.lua'
vim.call('plug#end')
-- NVIM TREE CONFIG
require("nvim-tree").setup({
sort_by = "name",
open_on_setup = true,
hijack_cursor = true,
view = {
side = "left",
width = 20,
mappings = {
list = {
{ key = "-", action = "dir_up" },
{key = "+", action = "cd"}
},
},
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
Steps to reproduce
- Open Nvim with a directory as a target.
- NvimTree will open in fullscreen mode as normal
- Choose a file and open it by pressing enter
- NvimTree will be positioned on the right side of the screen while the file will be opened on the left side
- Close the file with :q
- Now open it back again in the same way
- Now the file is on the right side while NvimTree is on the left, as it should
Expected behavior
NvimTree should be aligned to the left side the first time it is opened.
Actual behavior
No response