2025-01-01 13:59:07 -08:00
|
|
|
return {
|
|
|
|
'luasnip',
|
|
|
|
lazy = true,
|
|
|
|
before = function()
|
|
|
|
require('lz.n').trigger_load({
|
|
|
|
'friendly-snippets',
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
after = function()
|
|
|
|
require('luasnip').setup({
|
|
|
|
history = true,
|
|
|
|
delete_check_events = 'TextChanged',
|
|
|
|
})
|
|
|
|
|
|
|
|
-- friendly-snippets
|
|
|
|
require('luasnip.loaders.from_vscode').lazy_load()
|
|
|
|
|
2025-01-02 18:08:09 -08:00
|
|
|
-- 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 })
|
2025-01-01 13:59:07 -08:00
|
|
|
end,
|
|
|
|
}
|