mirror of
https://github.com/Ascyii/typstar.git
synced 2026-01-01 05:24:24 -05:00
feat(snip): warning if jsregexp is not installed
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user