nvim-lua / kickstart.nvim

A launch point for your personal nvim configuration
MIT License
19.32k stars 22.68k forks source link

packer fails to install `nvim-treesitter` #126

Closed githorse closed 1 year ago

githorse commented 1 year ago

Describe the bug When first opening Neovim after copying init.lua to ~/.config/nvim/init.lua, I get an error/warning:

==================================
    Plugins are being installed
    Wait until Packer completes,
       then restart nvim
==================================
E484: Can't open file /home/githorse/.config/nvim/syntax/syntax.vim
Press ENTER or type command to continue

I ignore that and hit enter. Now all the packages sync automatically, except for treesitter, which fails (consistently, over many attempts):


               packer.nvim - finished in 22.264s
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ✓ Installed lukas-reineke/indent-blankline.nvim
 ✓ Installed williamboman/mason-lspconfig.nvim
 ✓ Installed L3MON4D3/LuaSnip
 ✓ Installed nvim-telescope/telescope.nvim/0.1.x
 ✓ Installed nvim-lua/plenary.nvim
 ✓ Installed lewis6991/gitsigns.nvim
 ✓ Installed neovim/nvim-lspconfig
 ✓ Installed williamboman/mason.nvim
 ✓ Installed tpope/vim-sleuth
 ✓ Installed nvim-lualine/lualine.nvim
 ✗ Failed to install nvim-treesitter/nvim-treesitter
 ✓ Installed hrsh7th/cmp-nvim-lsp
 ✓ Installed nvim-treesitter/nvim-treesitter-textobjects
 ✓ Installed numToStr/Comment.nvim
 ✓ Installed navarasu/onedark.nvim
 ✓ Installed tpope/vim-fugitive
 ✓ Installed hrsh7th/nvim-cmp
 ✓ Installed nvim-telescope/telescope-fzf-native.nvim
 ✓ Installed tpope/vim-rhubarb
 ✓ Installed folke/neodev.nvim
 ✓ Installed j-hui/fidget.nvim
 ✓ Installed saadparwaiz1/cmp_luasnip

After closing and opening nvim a second time, all hell breaks loose, presumably due to the missing treesitter:

E5113: Error while calling lua chunk: ...cker/start/nvim-treesitter/lua/nvim-treesitter/query.lua:2: module 'vim.treesitter.query' not found:                                                                                                 
        no field package.preload['vim.treesitter.query']                                                                                                                                                                                      
        no file './vim/treesitter/query.lua'                                                                                                                                                                                                  
        no file '/usr/share/luajit-2.1.0-beta3/vim/treesitter/query.lua'                                                                                                                                                                      
        no file '/usr/local/share/lua/5.1/vim/treesitter/query.lua'                                                                                                                                                                           
        no file '/usr/local/share/lua/5.1/vim/treesitter/query/init.lua'                                                                                                                                                                      
        no file '/usr/share/lua/5.1/vim/treesitter/query.lua'                                                                                                                                                                                 
        no file '/usr/share/lua/5.1/vim/treesitter/query/init.lua'                                                                                                                                                                            
        no file './vim/treesitter/query.so'                                                                                                                                                                                                   
        no file '/usr/local/lib/lua/5.1/vim/treesitter/query.so'                                                                                                                                                                              
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim/treesitter/query.so'                                                                                                                                                                   
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                                                                                           
        no file './vim.so'                                                                                                                                                                                                                    
        no file '/usr/local/lib/lua/5.1/vim.so'                                                                                                                                                                                               
        no file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim.so'                                                                                                                                                                                    
        no file '/usr/local/lib/lua/5.1/loadall.so'                                                                                                                                                                                           
stack traceback:                                                                                                                                                                                                                              
        [C]: in function 'require'                                                                                                                                                                                                            
        ...cker/start/nvim-treesitter/lua/nvim-treesitter/query.lua:2: in main chunk                                                                                                                                                          
        [C]: in function 'require'                                                                                                                                                                                                            
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:3: in main chunk                                                                                                                                                          
        [C]: in function 'require'                                                                                                                                                                                                            
        /home/githorse/.config/nvim/init.lua:222: in main chunk                                                                                                                                                                                    
E484: Can't open file /home/githorse/.config/nvim/syntax/syntax.vim                                                                                                                                                                                
Error in packer_compiled: /home/githorse/.config/nvim/plugin/packer_compiled.lua:206: Vim(packadd):E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.treesitter' not found:^@^Ino field package.preload['vim.treesitter']
^@^Ino file './vim/treesitter.lua'^@^Ino file '/usr/share/luajit-2.1.0-beta3/vim/treesitter.lua'^@^Ino file '/usr/local/share/lua/5.1/vim/treesitter.lua'^@^Ino file '/usr/local/share/lua/5.1/vim/treesitter/init.lua'^@^Ino file '/usr/share
/lua/5.1/vim/treesitter.lua'^@^Ino file '/usr/share/lua/5.1/vim/treesitter/init.lua'^@^Ino file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/vim/treesitter.lua'^@^Ino file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0
-beta3/share/lua/5.1/vim/treesitter/init.lua'^@^Ino file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/vim/treesitter.lua'^@^Ino file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/
vim/treesitter/init.lua'^@^Ino file './vim/treesitter.so'^@^Ino file '/usr/local/lib/lua/5.1/vim/treesitter.so'^@^Ino file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim/treesitter.so'^@^Ino file '/usr/local/lib/lua/5.1/loadall.so'^@^Ino file '/h
ome/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/vim/treesitter.so'^@^Ino file './vim.so'^@^Ino file '/usr/local/lib/lua/5.1/vim.so'^@^Ino file '/usr/lib/x86_64-linux-gnu/lua/5.1/vim.so'^@^Ino file '/usr/local/lib/lua/5.1/load
all.so'^@^Ino file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/vim.so'^@stack traceback:^@^I[C]: in function 'require'^@^Ivim/_init_packages.lua: in function '__index'^@^I...er/start/nvim-treesitter/lua/nvim-treesitter
/parsers.lua:2: in main chunk^@^I[C]: in function 'require'^@^I...er/start/nvim-treesitter/lua/nvim-treesitter/install.lua:6: in main chunk^@^I[C]: in function 'require'^@^I...ack/packer/start/nvim-treesitter/lua/nvim-treesitter.lua:1: in
 main chunk^@^I[C]: in function 'require'^@^I.../packer/start/nvim-treesitter/plugin/nvim-treesitter.lua:9: in main chunk^@^I[C]: in function 'cmd'^@^I/home/githorse/.config/nvim/plugin/packer_compiled.lua:206: in function </home/githorse/.config/n
vim/plugin/packer_compiled.lua:10>^@^I[C]: in function 'pcall'^@^I/home/githorse/.config/nvim/plugin/packer_compiled.lua:10: in main chunk                                                                                                         
Please check your config for correctness                                                                                                                                                                                                      
Error in packer_compiled: /home/githorse/.config/nvim/plugin/packer_compiled.lua:207: Vim(lua):E5108: Error executing lua ...eesitter-textobjects/lua/nvim-treesitter-textobjects.lua:1: loop or previous error loading module 'nvim-treesitter.que
ry'^@stack traceback:^@^I[C]: in function 'require'^@^I...eesitter-textobjects/lua/nvim-treesitter-textobjects.lua:1: in main chunk^@^I[C]: in function 'require'^@^I[string ":lua"]:1: in main chunk^@^I[C]: in function 'cmd'^@^I/home/rct/.
config/nvim/plugin/packer_compiled.lua:207: in function </home/githorse/.config/nvim/plugin/packer_compiled.lua:10>^@^I[C]: in function 'pcall'^@^I/home/githorse/.config/nvim/plugin/packer_compiled.lua:10: in main chunk                             
Please check your config for correctness                                                                                                                                                                                                      
Error detected while processing /home/githorse/.local/share/nvim/site/pack/packer/start/nvim-lspconfig/plugin/lspconfig.lua:                                                                                                                       
E5113: Error while calling lua chunk: vim/_init_packages.lua:0: module 'vim.lsp' not found:                                                                                                                                                   
        no field package.preload['vim.lsp']                                                                                                                                                                                                   
        no file './vim/lsp.lua'                                                                                                                                                                                                               
        no file '/usr/share/luajit-2.1.0-beta3/vim/lsp.lua'                                                                                                                                                                                   
        no file '/usr/local/share/lua/5.1/vim/lsp.lua'                                                                                                                                                                                        
        no file '/usr/local/share/lua/5.1/vim/lsp/init.lua'                                                                                                                                                                                   
        no file '/usr/share/lua/5.1/vim/lsp.lua'                                                                                                                                                                                              
        no file '/usr/share/lua/5.1/vim/lsp/init.lua'                                                                                                                                                                                         
        no file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/vim/lsp.lua'                                                                                                                                                
        no file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/vim/lsp/init.lua'                                                                                                                                           
        no file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/vim/lsp.lua'                                                                                                                                       
        no file '/home/githorse/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/vim/lsp/init.lua'                                                                                                                                  
        no file './vim/lsp.so'                                                                                                                                                                                                                
        no file '/usr/local/lib/lua/5.1/vim/lsp.so'  

To Reproduce Steps to reproduce the behavior:

  1. $ rm -rf ~/.local/share/.nvim
  2. $ rm -rf ~/.cache/nvim
  3. $ rm -rf ~/.config/nvim
  4. $ mkdir ~/.config/nvim
  5. $ cp path/to/kickstart.nvim/init.lua ~/.config/nvim/
  6. $ nvim

Desktop (please complete the following information):

Neovim Version

:version                                                                                                                                                                                                                                      
NVIM v0.9.0-dev                                                                                                                                                                                                                               
Build type: RelWithDebInfo                                                                                                                                                                                                                    
LuaJIT 2.1.0-beta3                                                                                                                                                                                                                            
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-N1lIne/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b5866f=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_H
AS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-pro
totypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-N1lIn
e/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b5866f/build/cmake.config -I/build/neovim-N1lIne/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b5866f/src -I/build/neovim-N1lIne/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b58
66f/.deps/usr/include -I/usr/include -I/build/neovim-N1lIne/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b5866f/build/src/nvim/auto -I/build/neovim-N1lIne/neovim-0.9.0~ubuntu1+git202301080019-d89290b45-333b5866f/build/include        
Compiled by buildd@lcy02-amd64-048                                                                                                                                                                                                            

Features: +acl +iconv +tui                                                                                                                                                                                                                    
See ":help feature-compile"                                                                                                                                                                                                                   

   system vimrc file: "$VIM/sysinit.vim"                                                                                                                                                                                                      
  fall-back for $VIM: "/usr/share/nvim"                                                                                                                                                                                                       

Run :checkhealth for more info    
unfirthman commented 1 year ago

Hello

Have you tried running :TSUpdate when opening nvim?

feoh commented 1 year ago

Hiya! Please try this with the most recent version of kickstart.nvim - it no longer uses packer and has switched to lazy.nvim instead.

If you're still having problems with the new version please feel free to report a new issue here!

Thanks!