From afe68813affe07329e654c5364e582833cb94087 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Thu, 14 Mar 2024 08:30:55 +0100 Subject: [PATCH 1/2] move friendly snippets to dependencies of LuaSnip, as suggested by the docs --- init.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 04cc6b7a..6e41abe6 100644 --- a/init.lua +++ b/init.lua @@ -632,6 +632,13 @@ require('lazy').setup({ end return 'make install_jsregexp' end)(), + dependencies = { + -- If you want to add a bunch of pre-configured snippets, + -- you can use this plugin to help you. It even has snippets + -- for various frameworks/libraries/etc. but you will have to + -- set up the ones that are useful for you. + -- 'rafamadriz/friendly-snippets', + }, }, 'saadparwaiz1/cmp_luasnip', @@ -640,12 +647,6 @@ require('lazy').setup({ -- into multiple repos for maintenance purposes. 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', - - -- If you want to add a bunch of pre-configured snippets, - -- you can use this plugin to help you. It even has snippets - -- for various frameworks/libraries/etc. but you will have to - -- set up the ones that are useful for you. - -- 'rafamadriz/friendly-snippets', }, config = function() -- See `:help cmp` From 3dca27a750eec137b566a903afea02b3b401cfb0 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Thu, 14 Mar 2024 08:37:57 +0100 Subject: [PATCH 2/2] add LuaSnip lazy-loading for friendly-snippets --- init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6e41abe6..f8aff8a8 100644 --- a/init.lua +++ b/init.lua @@ -637,7 +637,12 @@ require('lazy').setup({ -- you can use this plugin to help you. It even has snippets -- for various frameworks/libraries/etc. but you will have to -- set up the ones that are useful for you. - -- 'rafamadriz/friendly-snippets', + -- { + -- 'rafamadriz/friendly-snippets', + -- config = function() + -- require('luasnip.loaders.from_vscode').lazy_load() + -- end, + -- }, }, }, 'saadparwaiz1/cmp_luasnip',