Skip to content

packer.nvim: Error running config for nvim-tree.lua: attempt to call a nil value #1017

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

Closed
anurag3301 opened this issue Feb 21, 2022 · 4 comments

Comments

@anurag3301
Copy link

OS
Linux arch 5.16.10-arch1-1 #1 SMP PREEMPT Wed, 16 Feb 2022 19:35:18 +0000 x86_64 GNU/Linux

Neovim version
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Nvim-tree version
master, 95df001

Describe the bug
Not Sure what it is but getting this error when I open nvim
image
Dont have any clue whats the mistake in the config

To Reproduce
I have stock nvim config installed using packer.nvim

@anurag3301
Copy link
Author

Nvim-tree config

require'nvim-tree'.setup {
  disable_netrw       = true,
  hijack_netrw        = true,
  open_on_setup       = false,
  ignore_ft_on_setup  = {},
  auto_close          = true,
  open_on_tab         = false,
  update_to_buf_dir   = {
    enable = true,
    auto_open = true,
  },
  hijack_cursor       = false,
  update_cwd          = false,
  diagnostics = {
    enable = false,
    icons = {
      hint = "",
      info = "",
      warning = "",
      error = "",
    }
  },
  update_focused_file = {
    enable      = false,
    update_cwd  = false,
    ignore_list = {}
  },
  system_open = {
    cmd  = nil,
    args = {}
  },

  view = {
    width = 30,
    height = 30,
    side = 'left',
    auto_resize = false,
    mappings = {
      custom_only = false,
      list = {}
    }
  }
}
vim.cmd("let g:nvim_tree_quit_on_open = 1")

Inside Packer config

  use {
    'kyazdani42/nvim-tree.lua',
    requires = 'kyazdani42/nvim-web-devicons',
    config = function() require'nvim-tree'.setup {} end
  }

@kyazdani42
Copy link
Member

hi, did you run :PackerSync ?

@anurag3301
Copy link
Author

anurag3301 commented Feb 21, 2022

Sorry, I ran only :PackerUpdate, Didnt know I have to use that. Thanks for letting me know.
BTW one problem quit_on_open isn't working

vim.cmd("let g:nvim_tree_quit_on_open = 1")

Did some changes have been made for this? I want nvim-tree to close as I open a file.

@kyazdani42
Copy link
Member

check :help nvim-tree.actions. quit on open was moved in the setup.
Closing this then :)

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

2 participants