feat(snip): warning if jsregexp is not installed

This commit is contained in:
arne314
2025-01-08 20:44:16 +01:00
parent 0b84b6c53d
commit 434dc5c6c4
2 changed files with 8 additions and 1 deletions

View File

@@ -105,6 +105,13 @@ function M.setup()
)
end
luasnip.add_snippets('typst', autosnippets)
local jsregexp_ok, _ = pcall(require, "luasnip-jsregexp")
if not jsregexp_ok then
jsregexp_ok, _ = pcall(require, "jsregexp")
end
if not jsregexp_ok then
vim.notify("WARNING: Most snippets won't work as jsregexp is not installed", vim.log.levels.WARN)
end
end
end