marleyvim/nvim/lua/plugins/coding/luasnip.lua

31 lines
682 B
Lua
Raw Normal View History

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 })
end,
}