Nvim-treesitter: Error message and no syntax parsing with recent versions

Created on 13 Oct 2020  路  5Comments  路  Source: nvim-treesitter/nvim-treesitter

Describe the bug
I'm getting consistent errors (causing the syntax highlighting to not work) when opening up .js, .jsx, .ts, and .tsx files.

The error message that appears is:

Error detected while processing function 3[30]..<SNR>30_callback:
line   21:
Vim(lua):E5108: Error executing lua ...54/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:63: attempt to index local 'parser' (a number value)

Screen Shot 2020-10-12 at 22 35 10

Note: this seems to be similar to https://github.com/nvim-treesitter/nvim-treesitter/issues/554

To Reproduce
Steps to reproduce the behavior:

  1. Be on latest versions of everything (nvim-tresitter and Neovim nightly) via a brew install --HEAD neovim and :PlugUpdate (using vim-plug to manage plugins)
  2. Open up any file of type .js .jsx, .ts, or .tsx
  3. See error logged in the command line and incorrect syntax highlighting:

Expected behavior
I would expect the file to open without any issue in syntax highlighting and with no errors shown.

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

ocaml parser healthcheck

go parser healthcheck

nix parser healthcheck

yaml parser healthcheck

json parser healthcheck

jsdoc parser healthcheck

php parser healthcheck

julia parser healthcheck

html parser healthcheck

typescript parser healthcheck

fennel parser healthcheck

swift parser healthcheck

query parser healthcheck

cpp parser healthcheck

regex 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

javascript parser healthcheck

c_sharp parser healthcheck

haskell parser healthcheck

markdown parser healthcheck

tsx parser healthcheck


Output of nvim --version
```NVIM v0.5.0-nightly-25-g759a05407
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-20201012-64512-1m9flum/build/config -I/tmp/neovim-20201012-64512-1m9flum/src -I/usr/local/include -I/tmp/neovim-20201012-64512-1m9flum/deps-build/include -I/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20201012-64512-1m9flum/build/src/nvim/auto -I/tmp/neovim-20201012-64512-1m9flum/build/include

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

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

Run :checkhealth for more info


**Additional context**
Add any other context about the problem here.

Below is the config I have in my vimrc for configuring nvim-treesitter

lua < require'nvim-treesitter.configs'.setup {
highlight = { enable = true },
ensure_installed = {"javascript", "typescript"},
incremental_selection = { enable = true, },
refactor = {
highlight_definitions = { enable = true },
highlight_current_scope = { enable = false },
navigation = { enable = false, }
}
}
EOF
```

bug

Most helpful comment

I have the same error here with the latest master of neovim.

All 5 comments

I have the same error here with the latest master of neovim.

Hi, could you try #540 to see if it fixes your issue?

I had the same error, #540 fixes the issue :+1: .

Should be fixed in latest master.

Yes, its now working again! Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings