Nvim-treesitter: Attempt to call field 'get_query' (a nil value)

Created on 19 Oct 2020  Â·  6Comments  Â·  Source: nvim-treesitter/nvim-treesitter

Describe the bug
Error detected while processing CursorMoved Autocommands for "":

To Reproduce
:PlugUpdate
:TSUpdate

Output of :checkhealth nvim_treesitter


elm parser healthcheck

  • OK: elm parser found.
  • ERROR: Error in highlights.scm query found for elm
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in locals.scm query found for elm
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in textobjects.scm query found for elm
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in folds.scm query found for elm
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



c parser healthcheck

  • OK: c parser found.
  • ERROR: Error in highlights.scm query found for c
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in locals.scm query found for c
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in textobjects.scm query found for c
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



  • ERROR: Error in folds.scm query found for c
    ...ad/plugged/nvim-treesitter/lua/nvim-treesitter/query.lua:49: attempt to call field 'get_query' (a nil value)

    • ADVICE:



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


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



....IT SAME ERROR FOR ALL PARSERS

Output of nvim --version

NVIM v0.5.0-nightly
Build type: Release
LuaJIT 2.0.5
bug

Most helpful comment

Hey @vigoux. Thanks for the help. Running "brew upgrade --fetch-HEAD neovim" upgraded neovim HEAD-4f8d98e -> HEAD-eaee3d9 and now the errors are gone.

All 6 comments

Hi, when did you last updated your neovim?

Hi @vigoux. I updated neovim today. I installed it via homebrew brew install --HEAD neovim

Could you both :

  • Show me the output of lua print(vim.inspect(require'vim.treesitter.query')) ?
  • Try running brew upgrade --HEAD --fetch-HEAD neovim ?
lua print(vim.inspect(require'vim.treesitter.query'))

{
    add_predicate = <function 1>,
    get_node_text = <function 2>,
    parse_query = <function 3>
}
nvim -v                                                                                                                               î‚¶ master !1
NVIM v0.5.0-43202964f
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -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/tmp/neovim-20200825-44712-1eejrdx/build/config -I/tmp/neovim-20200825-44712-1eejrdx/src -I/usr/local/include -I/tmp/neovim-20200825-44712-1eejrdx/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20200825-44712-1eejrdx/build/src/nvim/auto -I/tmp/neovim-20200825-44712-1eejrdx/build/include
Compiled by [email protected]

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

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

Run :checkhealth for more info

So this indicates that nvim version is too old, now we need to find a way for you to actually update to latest master. From what I remember, you need to add some --fetch-HEAD flag to homebrew to actually update

Hey @vigoux. Thanks for the help. Running "brew upgrade --fetch-HEAD neovim" upgraded neovim HEAD-4f8d98e -> HEAD-eaee3d9 and now the errors are gone.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

siduck76 picture siduck76  Â·  4Comments

pierpo picture pierpo  Â·  4Comments

xaljer picture xaljer  Â·  4Comments

PouriDev picture PouriDev  Â·  5Comments

heapslip picture heapslip  Â·  5Comments