fix: LuaSnip personal snippets working

This commit is contained in:
punkfairie 2025-01-02 18:08:09 -08:00
parent e7cddfde33
commit 983705f3b0
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696

View file

@ -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,
}