smjonas / snippet-converter.nvim

Bundle snippets from multiple sources and convert them to your format of choice.
Mozilla Public License 2.0
174 stars 4 forks source link

fix: compatibility with LuaJIT (and Lua 5.1) #5

Closed michaeladler closed 2 years ago

michaeladler commented 2 years ago

Thanks for this plugin, it saved me quite a bit of time converting my snippets. I'm using nvim+LuaJIT though, so I had to slightly patch the plugin to make it work for me.

smjonas commented 2 years ago

Thank you, glad you find my plugin useful! Do you know if unpack is defined instead of table.unpack in your Lua version? That would simplify things. Otherwise, could we use vim.deepcopy() instead?

michaeladler commented 2 years ago

Good point, this seems to be the way to go, e.g. https://github.com/nvim-lua/plenary.nvim/blob/12038fbea5ed7ee67d23544ab59d81e4ac3e3c9b/lua/luassert/compatibility.lua