wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.72k stars 263 forks source link

use 'nvim-tree/nvim-tree.lua' not working #1234

Closed souse closed 1 year ago

souse commented 1 year ago

Steps to reproduce

  1. ~/.config/nvim/init.lua
    require('plugins')
  2. ~/.config/nvim/lua/plugins.lua

    
    -- vim.cmd [[packadd packer.nvim]]
    return require('packer').startup(function(use)
    print('packer in ...')
    -- Packer can manage itself
    use 'wbthomason/packer.nvim'
    
    -- File tree
    use 'nvim-tree/nvim-tree.lua'

end)


### Actual behaviour

no :NvimTreeToggle command print('packer in ...') is executed in plugins.lua


### Expected behaviour

after execute nvim command, i want to see :NvimTreeToggle and other nvim-tree command.


### packer files

<details>
<summary>Plugin specification file(s)</summary>

Post or link your plugin specification files here, if you aren't able to provide a minimal
reproducer

</details>

<details>
<summary>packer log file</summary>

Post the contents of ~/.cache/nvim/packer.nvim.log here

</details>

<details>
<summary>packer compiled file</summary>

Post the contents of `packer_compiled.vim` here

</details>
souse commented 1 year ago

worked for me

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