LuaSnip
LuaSnip copied to clipboard
"undefined variable: json" after luasnip upgrade to current master
after upgrading the plugin with lazy, it get this error when calling snippets that contain a placeholder:
~/.local/share/nvim/lazy/LuaSnip/lua/luasnip/util/functions.lua:39: nvim_exec2(): Vim(echo):E121: Undefined variable: json
Version: branch master commit 98d9cb5
my plugin configuration:
return {
{
"L3MON4D3/LuaSnip",
build = vim.fn.has "win32" ~= 0 and "make install_jsregexp" or nil,
dependencies = {
"rafamadriz/friendly-snippets",
"benfowler/telescope-luasnip.nvim",
"molleweide/LuaSnip-snippets.nvim",
},
config = function(_, opts)
if opts then require("luasnip").config.setup(opts) end
vim.tbl_map(
function(type) require("luasnip.loaders.from_" .. type).lazy_load() end,
{ "vscode", "snipmate" }
)
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./snippets" } })
require("luasnip").filetype_extend("go", { "godoc" })
require("luasnip").filetype_extend("lua", { "luadoc" })
require("luasnip").filetype_extend("python", { "pydoc" })
require("luasnip").filetype_extend("sh", { "shelldoc" })
end,
},
}
any help is very much appreciated.
Hello :)
I think this is caused by a vim-function-evaluation done by a snippet, is something like that happening in your snipmate-snippets? Sorry about that error-message, it could be clearer 😅