Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NvimTree no longer has a fixed width #992

Closed
siduck opened this issue Feb 16, 2022 · 14 comments
Closed

NvimTree no longer has a fixed width #992

siduck opened this issue Feb 16, 2022 · 14 comments

Comments

@siduck
Copy link
Contributor

siduck commented Feb 16, 2022

I updated nvimtree plugin yesterday and now my nvim is fullscreen :/

image

@HenryCROSS
Copy link

I suffered the same issue.
Also, it somehow crashes the neovim when I hit the keybinding slowly when it is in the dashboard.

@gegoune
Copy link
Collaborator

gegoune commented Feb 16, 2022

It's a feature. People wanted full screen tree and that's what it is I think.

@konart
Copy link

konart commented Feb 16, 2022

It's a feature. People wanted full screen tree and that's what it is I think.

Features shouldn't break the old behaviour. Not without a notice at least.

@kyazdani42
Copy link
Member

Well yes it's a feature that fixed a lot of issues 😄
i pushed 76d4ed5 which should let you set hijack_unnamed_buffer_when_opening = false during setup

@siduck
Copy link
Contributor Author

siduck commented Feb 17, 2022

Well yes it's a feature that fixed a lot of issues smile i pushed 76d4ed5 which should let you set hijack_unnamed_buffer_when_opening = false during setup

i added that line to the setup but it still doesnt work :(

@kyazdani42
Copy link
Member

if you open with vim . or vim dir, nvim-tree hijacks the directory buffer and opens fullscreen

@siduck
Copy link
Contributor Author

siduck commented Feb 17, 2022

if you open with vim . or vim dir, nvim-tree hijacks the directory buffer and opens fullscreen

I just open neovim ( run nvim command ) and then do nvimtreetoggle, the default behaviour must have a fixed width like before at least.. Also I tried vim . , it opens the tree with fixed width for the first time and then opens fullscreen, cant I always keep the fixed width like before?

@kyazdani42
Copy link
Member

i fixed the issue when opening manually. Does it fix your issue ?

@siduck
Copy link
Contributor Author

siduck commented Feb 17, 2022

i fixed the issue when opening manually. Does it fix your issue ?

thx it works now! but nvimtreetoggle doesnt close with ( opening a dir with nvim i.e nvim command )

simplescreenrecorder-2022-02-17_19.09.26.mp4

siduck pushed a commit to NvChad/NvChad that referenced this issue Feb 17, 2022
@kyazdani42
Copy link
Member

i do not understand this issue @siduck. Could you open an issue with a good explanation of the problem ? Your example is a bit too fast 😄

@siduck
Copy link
Contributor Author

siduck commented Feb 19, 2022

i do not understand this issue @siduck. Could you open an issue with a good explanation of the problem ? Your example is a bit too fast smile

oh i meant, nvimtreetoggle stopped working when i opened neovim with a dir i.e nvim dirname . but it works when i just open neovim and then do nvimtreetoggle

@kyazdani42
Copy link
Member

please open a new issue ? i'm not sure of the steps to reproduce since this issue has gone beyond its original subject.

@batusai513
Copy link

@kyazdani42 is there a way to not have the behaviour of opening full screen when running :NvimTreeToggle after opening nvim with nvim .? I've already added hijack_unnamed_buffer_when_opening = false and it is not working (still open full screen when there are no files opened).

here is my config:

local config = {
  disable_netrw = true,
  hijack_netrw = true,
  open_on_setup = false,
  ignore_buffer_on_setup = false,
  ignore_ft_on_setup = {
    "startify",
    "dashboard",
    "alpha",
  },
  auto_reload_on_write = true,
  hijack_unnamed_buffer_when_opening = false,
	hijack_directories = {
		enable = true,
		auto_open = false,
	},
  auto_close = false,
  open_on_tab = false,
  hijack_cursor = false,
  update_cwd = false,
  diagnostics = diagnosticsConfig,
  update_focused_file = {
    enable = true,
    update_cwd = false,
    ignore_list = {},
  },
	system_open = {
		cmd = nil,
		args = {},
	},
	git = {
		enable = true,
		ignore = false,
		timeout = 500,
	},
  view = {
    width = 30,
    height = 30,
    hide_root_folder = false,
    side = "right",
    auto_resize = false,
    mappings = {
      custom_only = false,
      list = {
        { key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
        { key = "h", cb = tree_cb "close_node" },
        { key = "v", cb = tree_cb "vsplit" },

      },
    },
    number = false,
    relativenumber = false,
		signcolumn = "yes",
  },
	filters = {
		dotfiles = false,
		custom = { "node_modules", ".cache" },
	},
	trash = {
		cmd = "trash",
		require_confirm = true,
	},
	actions = {
		change_dir = {
			global = false,
		},
		open_file = {
			quit_on_open = false,
		},
		window_picker = {
			enable = true,
			chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
      exclude = {
        filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame", },
        buftype  = { "nofile", "terminal", "help", },
      }
		},
	},
  quit_on_open = 0,
}

thanks for your help

@kyazdani42
Copy link
Member

disable hijack_directories. nvim . opens the current directory so it hijacks it.

jtzero pushed a commit to jtzero/NvChad that referenced this issue Apr 14, 2022
jtzero pushed a commit to jtzero/NvChad that referenced this issue Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants