1

I am trying to use luasnip.

The configuration I am using is AstroNvim. The modifications I made to this configuration are :

  1. require("luasnip.loaders.from_snipmate").lazy_load() at the end of init.lua
  2. Made a directory snippets in the same directory of init.lua, and added some basic snipmate styled snippets inside.

Commands Like :LuaSnipListAvailable works well, and snippets from friendly-snippets works well too.

However the following error message pops up when opening neovim.

Error detected while processing /Users/myusername/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:171: Vim(echomsg):E121: Undefined variable: Error
stack traceback:
        [C]: in function 'cmd'
        ...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:171: in function <...m/site/pack/packer/start/packer.nvim/lua/packer/load.lua:16
7>
        /Users/myusername/.local/share/nvim/packer_compiled.lua:496: in function </Users/myusername/.local/share/nvim/packer_compiled.lua:485>
        [C]: in function 'require'
        /Users/myusername/.config/nvim/init.lua:23: in main chunk

I tried other methods of adding snippets, but any sort of require("luasnip") seems to break all.

Marvin Kim
  • 11
  • 2

0 Answers0