fix(cmp): don't enable snippets source without nvim-snippets

Make it easier, so if users decide to disable `nvim-snippets`, they
don't have to remove the `snippets` source manually in their config.
This commit is contained in:
Iordanis Petkakis 2024-06-07 21:49:19 +03:00
parent 789b1b4fd4
commit f7d6b934b3

View file

@ -111,7 +111,9 @@ return {
return LazyVim.cmp.expand(item.body)
end,
}
table.insert(opts.sources, { name = "snippets" })
if LazyVim.has("nvim-snippets") then
table.insert(opts.sources, { name = "snippets" })
end
end,
keys = {
{