nvim-treesitter / nvim-treesitter-textobjects

Apache License 2.0
2.15k stars 192 forks source link

Error on v0.6.1 #170

Closed danielnehrig closed 2 years ago

danielnehrig commented 2 years ago

Describe the bug When loading this plugin a error occurs.

Error detected while processing BufReadPost Autocommands for "*":
E5108: Error executing lua ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...vim/site/pack/packer/opt/packer.nvim
/lua/packer/load.lua:110: Vim(lua):E5108: Error executing lua ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:8: Vim(lua):E5108: Error executing lua ...r-textobjects/lua/nvim-trees
itter/textobjects/select.lua:59: attempt to concatenate local 'query' (a table value)
stack traceback:
        [C]: in function 'cmd'
        ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: in function <...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:161>
        [string ":lua"]:1: in main chunk

To Reproduce add the plugin to the treesitter config see attached video

Expected behavior no errors occur

Output of :checkhealth nvim_treesitter

nvim_treesitter: health#nvim_treesitter#check ======================================================================== ## Installation - OK: `tree-sitter` found 0.20.2 (parser generator, only needed for :TSInstallFromGrammar) - OK: `node` found v16.4.2 (only needed for :TSInstallFromGrammar) - OK: `git` executable found. - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: cc (GCC) 11.1.0 - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI. ## Parser/Features H L F I J - ocaml_interface✓ ✓ ✓ . ✓ - beancount ✓ . ✓ . . - python ✓ ✓ ✓ ✓ ✓ - sparql ✓ ✓ ✓ ✓ ✓ - comment ✓ . . . . - lua ✓ ✓ ✓ ✓ ✓ - ocaml ✓ ✓ ✓ . ✓ - ninja ✓ . ✓ ✓ . - ql ✓ ✓ . ✓ ✓ - glsl ✓ ✓ ✓ ✓ ✓ - json ✓ ✓ ✓ ✓ . - pug ✓ . . . ✓ - ledger ✓ . ✓ ✓ ✓ - php ✓ ✓ ✓ ✓ ✓ - clojure ✓ ✓ ✓ . ✓ - supercollider ✓ ✓ ✓ ✓ ✓ - heex ✓ . ✓ ✓ ✓ - godot_resource ✓ ✓ ✓ . . - typescript ✓ ✓ ✓ ✓ ✓ - fennel ✓ ✓ . . ✓ - query ✓ ✓ ✓ ✓ ✓ - cpp ✓ ✓ ✓ ✓ ✓ - vue ✓ . ✓ ✓ ✓ - latex ✓ . ✓ . ✓ - make ✓ . . . ✓ - rst ✓ ✓ . . ✓ - css ✓ . ✓ ✓ ✓ - glimmer ✓ . . . . - erlang . . . . . - gowork ✓ . . . ✓ - regex ✓ . . . . - nix ✓ ✓ ✓ . ✓ - svelte ✓ . ✓ ✓ ✓ - prisma ✓ . . . . - c ✓ ✓ ✓ ✓ ✓ - teal ✓ ✓ ✓ ✓ ✓ - java ✓ ✓ . ✓ ✓ - http ✓ . . . ✓ - llvm ✓ . . . . - hjson ✓ ✓ ✓ ✓ ✓ - gomod ✓ . . . ✓ - dart ✓ ✓ . ✓ ✓ - pioasm ✓ . . . ✓ - bash ✓ ✓ ✓ . ✓ - json5 ✓ . . . ✓ - vim ✓ ✓ . . ✓ - yaml ✓ ✓ ✓ ✓ ✓ - cmake ✓ . ✓ . . - zig ✓ . ✓ ✓ ✓ - bibtex ✓ . ✓ ✓ . - r ✓ ✓ . . . - julia ✓ ✓ ✓ ✓ ✓ - devicetree ✓ ✓ ✓ ✓ ✓ - gdscript ✓ ✓ . . ✓ - turtle ✓ ✓ ✓ ✓ ✓ - pascal ✓ ✓ ✓ ✓ ✓ - toml ✓ ✓ ✓ ✓ ✓ - tsx ✓ ✓ ✓ ✓ ✓ - fusion ✓ ✓ ✓ ✓ . - javascript ✓ ✓ ✓ ✓ ✓ - yang ✓ . ✓ . . - hocon ✓ . . . ✓ - surface ✓ . ✓ ✓ ✓ - dot ✓ . . . ✓ - go ✓ ✓ ✓ ✓ ✓ - commonlisp ✓ ✓ ✓ . . - cuda ✓ ✓ ✓ ✓ ✓ - c_sharp ✓ ✓ ✓ . ✓ - elixir ✓ ✓ ✓ ✓ ✓ - kotlin ✓ ✓ ✓ . ✓ - ruby ✓ ✓ ✓ ✓ ✓ - fish ✓ ✓ ✓ ✓ ✓ - ocamllex ✓ . . . ✓ - scala ✓ . ✓ . ✓ - dockerfile ✓ . . . ✓ - rust ✓ ✓ ✓ ✓ ✓ - jsonc ✓ ✓ ✓ ✓ ✓ - perl ✓ . . . . - tlaplus ✓ . ✓ . ✓ - html ✓ ✓ ✓ ✓ ✓ - scss ✓ . . ✓ . - graphql ✓ . . ✓ ✓ - rasi ✓ ✓ ✓ ✓ . - hcl ✓ . ✓ ✓ ✓ 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.6.1
Build type: Release
LuaJIT 2.0.5
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

https://user-images.githubusercontent.com/4050749/150252330-36624fbb-32ef-4c09-b8ae-64aaa372474f.mp4

danielnehrig commented 2 years ago

There is also a error happening when trying to do a fresh install of the lua parser looks like its only happening on lua right now so i guess this might be a parser issue ?

yutkat commented 2 years ago

This is due to a breaking change in treesitter. It's also happening in several other programs. https://github.com/nvim-treesitter/nvim-treesitter/issues/2295

theHamsta commented 2 years ago

Closing as duplicate.

yutkat commented 2 years ago

I fixed it by removing these mappings. https://github.com/nvim-treesitter/nvim-treesitter-textobjects/issues/167#issuecomment-1016283792