diff --git a/nvim/lua/plugins/coding/luasnip.lua b/nvim/lua/plugins/coding/luasnip.lua index d001c15..4a81cf4 100644 --- a/nvim/lua/plugins/coding/luasnip.lua +++ b/nvim/lua/plugins/coding/luasnip.lua @@ -15,7 +15,16 @@ return { -- friendly-snippets require('luasnip.loaders.from_vscode').lazy_load() - -- Personal snippets - require('luasnip.loaders.from_lua').load({ path = 'lua/snippets' }) + -- Personal snippets. + local snippets = {} + + local paths = vim.api.nvim_get_runtime_file('lua/snippets', true) + for _, path in ipairs(paths) do + if string.find(path, '%/nix%/store%/.+') then + table.insert(snippets, path) + end + end + + require('luasnip.loaders.from_lua').load({ paths = snippets }) end, }