wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.75k stars 261 forks source link

Lazyload event in packer will cause error #1039

Closed NEX-S closed 1 year ago

NEX-S commented 1 year ago

Steps to reproduce

use { ... event = "Cursorhold", config = .... }

Actual behaviour

Error detected while processing CursorHold 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:155: Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:20: Vim(append):Error e
xecuting lua callback: vim/keymap.lua:0: E31: No such mapping
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

Expected behaviour

NO ERROR

packer files

Plugin specification file(s) Post or link your plugin specification files here, if you aren't able to provide a minimal reproducer
packer log file Post the contents of ~/.cache/nvim/packer.nvim.log here
packer compiled file Post the contents of `packer_compiled.vim` here
NEX-S commented 1 year ago

new error

Error detected while processing InsertEnter 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:155: Vim(append):Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:20: Vim(append):Error e
xecuting lua callback: vim/keymap.lua:0: E31: No such mapping
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
yutkat commented 1 year ago

I got the same error, and I think the problem is this commit in this plugin. https://github.com/nvim-treesitter/nvim-treesitter-textobjects/commit/0a0ea5ec56fbb3f69b7b93a8ff399119e379137e

https://github.com/nvim-treesitter/nvim-treesitter-textobjects/pull/269

NEX-S commented 1 year ago

oh, that's right. It's too hard to locate where the error is :(