Skip to content

Query: invalid node type at position 1400 for language rust #316

@fikovnik

Description

@fikovnik

Describe the bug

After installing nvim-treesitter-textobject, I get the following error on every rust file:

Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:22: Error executing lua: /usr/share/nvim/runtime/
filetype.lua:23: Vim(append):Error executing lua callback: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:219:
 query: invalid node type at position 1400 for language rust
stack traceback:
        [C]: in function '_ts_parse_query'
        /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:219: in function 'get_query'
        ...cker/start/nvim-treesitter/lua/nvim-treesitter/query.lua:104: in function 'get_query'
        ...r-textobjects/lua/nvim-treesitter/textobjects/attach.lua:9: in function 'attach'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:505: in function 'attach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:528: in function 'reattach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:131: in function <...er/start/nvim-treesitter/lu
a/nvim-treesitter/configs.lua:130>

To Reproduce

  1. Install the plugin
  2. Open any rust file

Expected behavior

No errors

Output of :checkhealth nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check()

Installation

  • OK: tree-sitter found 0.20.7 (parser generator, only needed for :TSInstallFromGrammar)
  • OK: node found v19.0.0 (only needed for :TSInstallFromGrammar)
  • OK: git executable found.
  • OK: cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (GCC) 12.2.0
  • OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

Parser/Features H L F I J

  • cpp ✓ ✓ ✓ ✓ ✓
  • dockerfile ✓ . . . ✓
  • html ✓ ✓ ✓ ✓ ✓
  • yaml ✓ ✓ ✓ ✓ ✓
  • c ✓ ✓ ✓ ✓ ✓
  • make ✓ . ✓ . ✓
  • r ✓ ✓ . ✓ ✓
  • scala ✓ . ✓ . ✓
  • lua ✓ ✓ ✓ ✓ ✓
  • bash ✓ ✓ ✓ . ✓
  • toml ✓ ✓ ✓ ✓ ✓
  • rust ✓ ✓ ✓ ✓ ✓

Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}

Output of nvim --version

NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

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

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

Run :checkhealth for more info

Additional context

It used to work just fine, until today when I did PackerSync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions