Nvim-treesitter: query.lua - invalid node type

Created on 25 Nov 2020  路  5Comments  路  Source: nvim-treesitter/nvim-treesitter

Describe the bug
After the latest update, when opening a lua file this is thrown:

Error detected while processing FileType Autocommands for "*":
E5108: Error executing lua /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:119: query: invalid node type at position 1483

To Reproduce
Steps to reproduce the behavior:

  1. Update, open lua file

Expected behavior
No error.

Output of :checkhealth nvim_treesitter


health#nvim_treesitter#check

Installation

  • OK: git executable found.
  • OK: cc executable found.

elm parser healthcheck

c parser healthcheck

teal parser healthcheck

java parser healthcheck

python parser healthcheck

dart parser healthcheck

lua parser healthcheck

  • OK: lua parser found.
  • ERROR: Error in highlights.scm query found for lua
    /usr/local/share/nvim/runtime/lua/vim/treesitter/query.lua:119: query: invalid node type at position 1483

    • ADVICE:



      • Try :TSUpdate lua (queries might have been adapted for a upstream parser change)


      • Try to find the syntax error/invalid node type in above file.



  • OK: locals.scm found.
  • OK: folds.scm found.
  • OK: indents.scm found.

ocaml parser healthcheck

go parser healthcheck

nix parser healthcheck

yaml parser healthcheck

json parser healthcheck

jsdoc parser healthcheck

php parser healthcheck

clojure parser healthcheck

html parser healthcheck

typescript parser healthcheck

fennel parser healthcheck

swift parser healthcheck

query parser healthcheck

regex parser healthcheck

cpp parser healthcheck

verilog parser healthcheck

ql parser healthcheck

ruby parser healthcheck

vue parser healthcheck

ocamllex parser healthcheck

scala parser healthcheck

toml parser healthcheck

rust parser healthcheck

bash parser healthcheck

ocaml_interface parser healthcheck

rst parser healthcheck

css parser healthcheck

julia parser healthcheck

javascript parser healthcheck

haskell parser healthcheck

c_sharp parser healthcheck

tsx parser healthcheck




Output of nvim --version

NVIM v0.5.0-869-g71d4f5851
Build type: Debug
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=1 -I/home/rabbit/sources/neovim/build/config -I/home/rabbit/sources/neovim/src -I/home/rabbit/sources/neovim/.deps/usr/include -I/usr/include -I/home/rabbit/sources/neovim/build/src/nvim/auto -I/home/rabbit/sources/neovim/build/include
Compiled by rabbit@station

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

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

Run :checkhealth for more info

bug

All 5 comments

Did you ran TSUpdate lua?

I just had the same issue. Updating tree-sitter homebrew package from HEAD fixed it.

edit: and then rebuilding neovim afterward

@vigoux TSUpdate lua fixed it for me, thank you!

Since TSUpdate now reinstalls outdated parsers, we could the check on startup? It's only comparing SHAs.

Or we just recommend in documentation more urgently to add it to you plugin manager Post-Update hook.

I would do both, that way people will update more often.

Was this page helpful?
0 / 5 - 0 ratings