feat(cmp): better error handling and automatic fixing of snippets that fail to parse with native Neovim snippets

This commit is contained in:
Folke Lemaitre 2024-05-19 22:48:01 +02:00
parent 7d72436193
commit 97862f4259
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 31 additions and 0 deletions

View file

@ -93,6 +93,11 @@ return {
{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } },
},
opts = function(_, opts)
opts.snippet = {
expand = function(item)
return LazyVim.cmp.expand(item.body)
end,
}
table.insert(opts.sources, { name = "snippets" })
end,
keys = {