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.72k stars 263 forks source link

InsertEnter Autocommands cause packer load plugin failed #1160

Closed lost22git closed 1 year ago

lost22git commented 1 year ago

there is an error if nvim-cmp lazyload after vim.filetype

Error detected while processing InsertEnter Autocommands for "*":
E5108: Error executing lua ...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:179: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:118: Vim(lua):E5108: Error executing lua ...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:179: Vim(echomsg):E114: Missing quote: \"Error in packer_compiled: ...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:168: Vim(append):Error executing lua callback: ...obal\apps\neovim\current\share\nvim\runtime\filetype.lua:22: Error executing lua: ...obal\apps\neovim\current\share\nvim\runtime\filetype.lua:23: Vim(append):Error executing lua callback: vim/keymap.lua:127: E31: No such mapping
stack traceback:
    [C]: in function 'cmd'
    ...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:179: in function <...ata\site\pack\packer\opt\packer.nvim/lua/packer/load.lua:175>
    [string ":lua"]:1: in main chunk

ERROR

use {
  'hrsh7th/nvim-cmp',
  module = {"cmp"},
  event = { "InsertEnter", "CmdlineEnter" },
  config = conf.cmp
}

OK

use {
  'hrsh7th/nvim-cmp',
  module = {"cmp","vim.filetype"},
  event = { "InsertEnter", "CmdlineEnter" },
  config = conf.cmp
}

This problem will also occur if the Telescope is configured in this way