Nvim-treesitter: Error detected while processing FileType Autocommands for "*"

Created on 4 Nov 2020  路  6Comments  路  Source: nvim-treesitter/nvim-treesitter

Describe the bug

I just updated plugins then :TSUpdate and now whenever I open a ruby or go file, this error pops up:

Error detected while processing FileType Autocommands for "*":
E5108: Error executing lua ...al/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:71: attempt to index a nil value 

I tested with other languages and they don't have this issue.

Output of nvim --version

NVIM v0.5.0-775-gb59b8dd5b5fb

Additional context
Here is my neovim config.

packadd minpac

call minpac#init()
call minpac#add('k-takata/minpac', { 'type': 'opt' })
call minpac#add('fatih/vim-go', { 'type': 'opt' })
call minpac#add('vim-ruby/vim-ruby', { 'type': 'opt' })
call minpac#add('nvim-treesitter/nvim-treesitter')

augroup pack_filetype
  autocmd!
  autocmd FileType go packadd vim-go
  autocmd FileType ruby packadd vim-ruby
augroup END

lua <<EOF
vim.cmd('packadd nvim-treesitter')
require'nvim-treesitter.configs'.setup {
  ensure_installed = "all",     -- one of "all", "language", or a list of languages
  highlight = {
    enable = true,              -- false will disable the whole extension
  },
}
EOF
bug

All 6 comments

Same issue here for Python.

Neovim version: NVIM v0.5.0-784-gc6ccdda26

Hi, and thanks for reporting.
Both of your nvim version seems a bit old, could you try updating first ?

If the issue persists, try updating both the plugin and run TSUpdate.

Updated to NVIM v0.5.0-804-geee066881 and everything is working.

I definitely thought I had the newest version, thanks.

Sorry! Forgot to include a warning https://github.com/nvim-treesitter/nvim-treesitter/pull/629#issuecomment-721329733

We really need to automate TSUpdate. We should write the revision of the parser to disk whenever it's installed to detect when lockfile was updated.

I'd actually suggest everyone to run TSUpdate after each plugin update, most plugin managers do that

Updated and it's working again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChrisAmelia picture ChrisAmelia  路  6Comments

xaljer picture xaljer  路  4Comments

PouriDev picture PouriDev  路  5Comments

krkhan picture krkhan  路  3Comments

heapslip picture heapslip  路  5Comments