From 41b3931071a8f27e0376f9eafaf2d41712ce6c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=BAc=20L=C3=AA=20Kh=E1=BA=AFc?= Date: Sun, 7 Apr 2024 08:29:59 +0700 Subject: [PATCH] feat(snippet): add friendly-snippets to native extra --- .../plugins/extras/coding/native_snippets.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/native_snippets.lua b/lua/lazyvim/plugins/extras/coding/native_snippets.lua index cc501ff7..e94d40ad 100644 --- a/lua/lazyvim/plugins/extras/coding/native_snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/native_snippets.lua @@ -11,13 +11,18 @@ return { }, { "nvim-cmp", - opts = { - snippet = { + dependencies = { + { "rafamadriz/friendly-snippets" }, + { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, + }, + opts = function(_, opts) + opts.snippet = { expand = function(args) vim.snippet.expand(args.body) end, - }, - }, + } + table.insert(opts.sources, { name = "snippets" }) + end, keys = { { "",