nvim-lua / kickstart.nvim

A launch point for your personal nvim configuration
MIT License
18.35k stars 20.39k forks source link

Error in `treesitter/query.lua` on fresh macOSX install #1074

Open Iddodo opened 1 month ago

Iddodo commented 1 month ago

Describe the bug

Greeted with the following error as soon as I open a Lua file with neovim:

Error detected while processing BufReadPost Autocommands for "*":                                                                 
Error executing lua callback: ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:35: Error executing lua: ...rew/Cellar/n
eovim/0.10.1/share/nvim/runtime/filetype.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_
LoadFTPlugin[20]..script /opt/homebrew/Cellar/neovim/0.10.1/share/nvim/runtime/ftplugin/lua.lua: Vim(runtime):E5113: Error while c
alling lua chunk: ...m/0.10.1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 51:17. Invalid node type "string
_content":                                                                                                                        
      content: (string_content) @injection.content)))                                                                             
                ^                                                                                                                 

stack traceback:                                                                                                                  
        [C]: in function '_ts_parse_query'                                                                                        
        ...m/0.10.1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'                                         
        ...ovim/0.10.1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'                                          
        ...ovim/0.10.1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'                                         
        ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:128: in function 'new'                                        
        .../neovim/0.10.1/share/nvim/runtime/lua/vim/treesitter.lua:41: in function '_create_parser'                              
        .../neovim/0.10.1/share/nvim/runtime/lua/vim/treesitter.lua:108: in function 'get_parser'                                 
        .../neovim/0.10.1/share/nvim/runtime/lua/vim/treesitter.lua:416: in function 'start'                                      
        ...Cellar/neovim/0.10.1/share/nvim/runtime/ftplugin/lua.lua:2: in main chunk                                              
        [C]: in function 'nvim_cmd'                                                                                               
        ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:36: in function <...rew/Cellar/neovim/0.10.1/share/nvim/runtim
e/filetype.lua:35>                                                                                                                
        [C]: in function 'nvim_buf_call'                                                                                          
        ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:35: in function <...rew/Cellar/neovim/0.10.1/share/nvim/runtim
e/filetype.lua:10>                                                                                                                
stack traceback:                                                                                                                  
        [C]: in function 'nvim_cmd'                                                                                               
        ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:36: in function <...rew/Cellar/neovim/0.10.1/share/nvim/runtim
e/filetype.lua:35>                                                                                                                
        [C]: in function 'nvim_buf_call'                                                                                          
        ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:35: in function <...rew/Cellar/neovim/0.10.1/share/nvim/runtim
e/filetype.lua:10>                                                                                                                
stack traceback:                                                                                                                  
        [C]: in function 'nvim_buf_call'                                                                                          
        ...rew/Cellar/neovim/0.10.1/share/nvim/runtime/filetype.lua:35: in function <...rew/Cellar/neovim/0.10.1/share/nvim/runtim
e/filetype.lua:10>

Trying to open a TypeScript file, I get the following error:

Error in decoration provider treesitter/highlighter.win:                                                                          
Error executing lua: ...m/0.10.1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 52:2. Invalid node type "func
tion_expression":                                                                                                                 
(function_expression                                                                                                              
 ^                                                                                                                                

stack traceback:                                                                                                                  
        [C]: in function '_ts_parse_query'                                                                                        
        ...m/0.10.1/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'                                         
        ...ovim/0.10.1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'                                          
        ...ovim/0.10.1/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'                                         
        ....1/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in function 'new'                                         
        ....1/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:243: in function 'get_query'                                  
        ....1/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:191: in function 'fn'                                         
        ...1/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'                              
        ....1/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:178: in function 'prepare_highlight_states'                   
        ....1/share/nvim/runtime/lua/vim/tree

To Reproduce

  1. Install the latest version of neovim provided by brew (0.10.1) on Sonoma 14.5
  2. install kickstart.nvim like so:
    cd ~/.config
    git clone https://github.com/nvim-lua/kickstart.nvim
    mv kickstart.nvim nvim
  3. Open some Lua file with neovim

Desktop

Neovim Version

NVIM v0.10.1                                                                                                                      
Build type: Release                                                                                                               
LuaJIT 2.1.1720049189
Efe-Torunoglu commented 1 month ago

I'm having the exact same issue

feoh commented 1 week ago

I'll try testing this on my mac later.

adrian-brady commented 1 week ago

Could this be from tsserver being deprecated (now should use ts_ls. see issue#1128)?