Skip to content
Discussion options

You must be logged in to vote

Okay finally figured it out!

So I'm using packer and setup so that luasnip is lazy loaded by module. Now since luasnip has a ftdetect and ftplugin folders, packer will execute a BufRead event when loading luasnip.

So when entering insert mode the InsertEnter autocmd triggers the function to setup cmp which in turn calls the luasnip module which makes packer load luasnip and therefore trigger BufRead again.

Opened a PR to be able to manually be able to set if BufRead is needed in packer here: wbthomason/packer.nvim#769

Puh!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AckslD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant